3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=500000; while($i < 60000) { $i++; $j++; $data1[] = md5($i); $data2[] = md5($j); } $time = microtime(true); echo "Starting array_diff\n"; $data_diff1 = array_diff($data1, $data2); $time = microtime(true) - $time; echo 'array_diff() took ' . number_format($time, 3) . ' seconds and returned ' . count($data_diff1) . " entries\n";

Abusive script

This script was stopped while abusing our resources

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0550.05228.75
8.3.50.0200.06328.75
8.3.40.0330.05629.88
8.3.30.0410.04829.88
8.3.20.0450.05830.13
8.3.10.0460.05329.96
8.3.00.0370.05429.92
8.2.180.0420.05328.95
8.2.170.0400.05129.98
8.2.160.0370.05129.75
8.2.150.0400.05029.98
8.2.140.0450.04829.91
8.2.130.0560.05030.00
8.2.120.0330.05930.00
8.2.110.0410.06530.00
8.2.100.0460.05629.75
8.2.90.0300.06429.85
8.2.80.0630.04029.88
8.2.70.0530.06029.75
8.2.60.0200.04729.87
8.2.50.0570.03729.63
8.2.40.0480.06829.88
8.2.30.0510.05129.63
8.2.20.0540.04129.63
8.2.10.0380.04829.75
8.2.00.0270.04729.85
8.1.280.0410.05131.21
8.1.270.0500.04632.55
8.1.260.0670.05432.70
8.1.250.0590.07032.52
8.1.240.0510.06132.74
8.1.230.0600.05132.59
8.1.220.0340.05532.61
8.1.210.0290.06832.65
8.1.200.0280.05932.77
8.1.190.0280.06232.50
8.1.180.0370.05132.41
8.1.170.0270.06132.74
8.1.160.0440.04732.61
8.1.150.0430.06132.69
8.1.140.0360.06632.62
8.1.130.0360.05232.71
8.1.120.0310.05832.61
8.1.110.0220.08132.46
8.1.100.0410.06332.15
8.1.90.0310.07532.57
8.1.80.0380.06632.57
8.1.70.0440.08432.11
8.1.60.0470.06132.57
8.1.50.0400.05332.46
8.1.40.0410.04832.66
8.1.30.0490.05832.70
8.1.20.0710.04532.57
8.1.10.0480.04532.46
8.1.00.0500.05732.27
8.0.300.0500.07631.34
8.0.290.0720.05331.15
8.0.280.0500.06131.66
8.0.270.0360.05131.75
8.0.260.0430.05631.84
8.0.250.0490.04931.95
8.0.240.0340.04932.06
8.0.230.0480.05432.06
8.0.220.0450.04931.82
8.0.210.0480.06131.71
8.0.200.0400.07031.80
8.0.190.0380.04831.77
8.0.180.0480.06031.86
8.0.170.0370.06031.83
8.0.160.0340.05531.77
8.0.150.0350.05231.95
8.0.140.0520.03631.81
8.0.130.0630.05331.63
8.0.120.0330.06931.52
8.0.110.0360.05331.74
8.0.100.0470.03831.94
8.0.90.0390.04631.94
8.0.80.0450.06231.81
8.0.70.0420.05431.64
8.0.60.0320.05131.73
8.0.50.0420.05831.94
8.0.30.0610.05131.56
8.0.20.0370.06131.64
8.0.10.0350.05532.00
8.0.00.0170.06932.11
7.4.330.0370.04731.50
7.4.320.0260.07831.50
7.4.300.0320.08031.30
7.4.290.0460.05731.59
7.4.280.0500.05631.39
7.4.270.0510.05831.13
7.4.260.0210.07031.48
7.4.250.0450.03931.58
7.4.240.0430.04331.71
7.4.230.0480.06331.48
7.4.220.0520.04831.71
7.4.210.0460.03631.71
7.4.200.0490.05931.03
7.4.190.0470.07231.34
7.4.180.0410.06531.37
7.4.160.0330.05331.63
7.4.150.0310.05531.62
7.4.140.0430.05731.62
7.4.130.0370.06331.58
7.4.120.0450.07431.72
7.4.110.0350.06031.71
7.4.100.0330.05131.83
7.4.90.0530.05031.48
7.4.80.0540.05431.17
7.4.70.0340.05031.62
7.4.60.0460.06431.57
7.4.50.0440.04131.13
7.4.40.0370.06031.14
7.4.30.0320.06531.29
7.4.20.0330.06331.07
7.4.10.0370.06331.23
7.4.00.0420.05431.12
7.3.330.0480.05131.22
7.3.320.0300.05331.54
7.3.310.0320.06431.21
7.3.300.0300.06431.50
7.3.290.0410.05431.41
7.3.280.0450.03931.16
7.3.270.0440.04131.32
7.3.260.0390.04931.21
7.3.250.0410.06830.95
7.3.240.0420.05831.44
7.3.230.0420.04531.11
7.3.220.0310.05531.45
7.3.210.0440.06931.42
7.3.200.0400.07431.33
7.3.190.0470.05331.62
7.3.180.0390.06531.35
7.3.170.0440.05431.09
7.3.160.0390.05231.25
7.3.150.0270.07431.25
7.3.140.0330.07031.24
7.3.130.0410.05631.05
7.3.120.0330.07431.12
7.3.110.0320.06731.15
7.3.100.0360.06231.06
7.3.90.0360.06531.15
7.3.80.0330.05531.12
7.3.70.0410.06331.27
7.3.60.0430.06531.10
7.3.50.0340.06531.21
7.3.40.0460.06431.24
7.3.30.0300.05431.37
7.3.20.0510.06231.43
7.3.10.0410.06731.25
7.3.00.0710.06831.27
7.2.340.0350.08430.84
7.2.330.0280.06730.88
7.2.320.0410.07531.00
7.2.310.0320.06430.64
7.2.300.0440.06830.79
7.2.290.0320.07730.88
7.2.280.0370.05831.03
7.2.270.0320.06630.95
7.2.260.0300.07731.08
7.2.250.0390.08231.18
7.2.240.0490.07830.97
7.2.230.0250.07430.97
7.2.220.0360.08131.09
7.2.210.0460.04931.03
7.2.200.0240.08631.09
7.2.190.0370.05430.93
7.2.180.0330.06031.19
7.2.170.0340.07831.10
7.2.160.0300.07130.99
7.2.150.0410.07631.32
7.2.140.0360.08731.22
7.2.130.0350.08031.47
7.2.120.0370.06631.38
7.2.110.0400.06531.37
7.2.100.0460.07231.56
7.2.90.0160.07631.72
7.2.80.0320.07631.68
7.2.70.0330.07331.75
7.2.60.0290.06031.64
7.2.50.0320.07331.50
7.2.40.0380.06731.74
7.2.30.0270.06131.62
7.2.20.0400.06631.72
7.2.10.0220.09031.64
7.2.00.1090.07132.18
7.1.330.0320.07830.55
7.1.320.0410.06130.63
7.1.310.0300.06630.79
7.1.300.0350.07930.61
7.1.290.0340.07230.77
7.1.280.0220.07430.58
7.1.270.0240.08730.75
7.1.260.0340.05930.61
7.1.250.0250.08130.58
7.1.240.0230.07230.41
7.1.230.0370.05930.61
7.1.220.0310.08030.47
7.1.210.0220.08830.48
7.1.200.0320.08830.71
7.1.190.0390.07130.62
7.1.180.0230.07930.39
7.1.170.0260.07930.42
7.1.160.0380.09430.60
7.1.150.0250.07230.62
7.1.140.0420.07930.52
7.1.130.0260.06730.64
7.1.120.0700.08830.88
7.1.110.0600.08231.12
7.1.100.0570.09230.81
7.1.90.0490.07830.88
7.1.80.0480.08330.75
7.1.70.0650.08430.50
7.1.60.0750.07636.60
7.1.50.0640.08236.31
7.1.40.0870.08936.34
7.1.30.0840.08636.34
7.1.20.0920.07436.47
7.1.10.0530.07430.37
7.1.00.1030.09831.42
7.0.330.0240.07130.28
7.0.320.0330.07830.31
7.0.310.0210.07530.27
7.0.300.0330.07130.38
7.0.290.0300.07030.39
7.0.280.0200.07830.28
7.0.270.0230.07330.46
7.0.260.0980.08730.62
7.0.250.0520.08230.63
7.0.240.0540.08530.67
7.0.230.0520.08830.72
7.0.220.0440.07630.61
7.0.210.1740.07230.13
7.0.200.0760.08530.26
7.0.190.0650.07830.39
7.0.180.0810.09130.08
7.0.170.0690.08930.07
7.0.160.0910.08929.89
7.0.150.0520.08330.01
7.0.140.1350.09931.24
7.0.130.1150.08831.23
7.0.120.1480.09331.36
7.0.110.1620.09631.31
7.0.100.1160.10131.18
7.0.90.1340.08631.17
7.0.80.1340.08731.25
7.0.70.1470.09431.29
7.0.60.1250.08231.24
7.0.50.1460.08731.24
7.0.40.1350.09531.36
7.0.30.1420.08531.21
7.0.20.1440.10631.37
7.0.10.1530.09731.27
7.0.00.1310.09131.25
5.6.400.0510.38645.43
5.6.390.0560.34445.34
5.6.380.0500.34145.42
5.6.370.0560.37045.44
5.6.360.0420.33045.57
5.6.350.0470.32645.38
5.6.340.0490.31545.28
5.6.330.0400.29945.64
5.6.320.0420.30545.60
5.6.310.0530.36845.59
5.6.300.0390.40147.15
5.6.290.0450.35847.98
5.6.280.0420.39447.99
5.6.270.0400.40647.96
5.6.260.0390.43148.05
5.6.250.0540.49047.97
5.6.240.0470.37748.06
5.6.230.0430.35348.05
5.6.220.0450.38948.11
5.6.210.0410.38548.23
5.6.200.0590.39448.14
5.6.190.0460.44048.08
5.6.180.0350.41948.13
5.6.170.0530.45048.04
5.6.160.0500.42348.13
5.6.150.0520.41548.03
5.6.140.0440.41548.10
5.6.130.0380.43448.04
5.6.120.0400.38048.15
5.6.110.0440.40148.01
5.6.100.0410.44848.11
5.6.90.0460.40548.06
5.6.80.0350.35247.75
5.6.70.0450.38947.69
5.6.60.0390.38347.71
5.6.50.0400.36847.61
5.6.40.0340.36347.70
5.6.30.0390.37647.66
5.6.20.0440.46747.72
5.6.10.0350.45047.60
5.6.00.0380.42447.70
5.5.380.0480.39246.42
5.5.370.0360.36146.25
5.5.360.0380.41046.40
5.5.350.0440.39546.35
5.5.340.0460.40346.57
5.5.330.0470.43746.54
5.5.320.0430.41346.59
5.5.310.0440.46946.54
5.5.300.0420.42046.58
5.5.290.0430.38846.51
5.5.280.0440.43746.48
5.5.270.0490.41346.54
5.5.260.0480.44046.45
5.5.250.0460.45746.41
5.5.240.0450.41646.22
5.5.230.0420.34846.13
5.5.220.0520.36546.26
5.5.210.0370.43646.27
5.5.200.0420.35446.18
5.5.190.0470.40446.19
5.5.180.0420.52546.15
5.5.170.0650.40345.49
5.5.160.0450.41346.25
5.5.150.0450.39746.28
5.5.140.0380.42546.25
5.5.130.0430.44146.26
5.5.120.0340.43646.16
5.5.110.0390.33346.15
5.5.100.0440.38646.16
5.5.90.0360.37946.09
5.5.80.0340.36146.22
5.5.70.0420.37546.29
5.5.60.0420.35846.17
5.5.50.0390.40646.18
5.5.40.0500.38746.20
5.5.30.0390.45846.18
5.5.20.0450.40346.21
5.5.10.0440.39946.08
5.5.00.0450.42246.05
5.4.450.0420.34945.67
5.4.440.0330.38645.56
5.4.430.0450.36945.58
5.4.420.0400.38545.65
5.4.410.0430.37145.59
5.4.400.0340.38845.49
5.4.390.0440.41045.48
5.4.380.0480.36145.45
5.4.370.0440.41445.45
5.4.360.0400.36445.38
5.4.350.0460.44345.38
5.4.340.0400.47245.37
5.4.330.0360.40942.30
5.4.320.0420.37345.41
5.4.310.0370.38145.37
5.4.300.0350.44145.35
5.4.290.0370.41645.40
5.4.280.0530.43045.46
5.4.270.0390.40745.37
5.4.260.0320.37945.39
5.4.250.0330.39045.30
5.4.240.0450.43445.33
5.4.230.0420.39845.29
5.4.220.0370.40845.38
5.4.210.0340.41145.29
5.4.200.0390.40145.41
5.4.190.0330.37845.38
5.4.180.0580.44045.30
5.4.170.0350.44045.31
5.4.160.0420.38245.34
5.4.150.0310.35445.32
5.4.140.0420.38744.16
5.4.130.0500.39744.13
5.4.120.0370.39844.15
5.4.110.0420.42844.17
5.4.100.0420.43544.20
5.4.90.0390.39644.15
5.4.80.0350.36244.13
5.4.70.0420.42144.22
5.4.60.0350.45444.06
5.4.50.0400.42344.05
5.4.40.0460.43444.09
5.4.30.0450.43944.07
5.4.20.0350.39944.07
5.4.10.0340.36944.16
5.4.00.0330.44743.76
5.3.290.0360.33742.94
5.3.280.0390.37042.81
5.3.270.0400.39842.87
5.3.260.0340.40442.88
5.3.250.0310.35642.91
5.3.240.0430.43442.81
5.3.230.0410.38542.88
5.3.220.0370.38442.75
5.3.210.0370.40642.76
5.3.200.0370.39142.72
5.3.190.0310.41042.68
5.3.180.0430.36142.89
5.3.170.0370.39142.80
5.3.160.0380.39042.89
5.3.150.0520.43142.83
5.3.140.0470.44742.76
5.3.130.0330.34442.81
5.3.120.0300.34942.79
5.3.110.0360.33942.81
5.3.100.0390.37742.60
5.3.90.0390.34142.59
5.3.80.0300.36942.49
5.3.70.0340.43142.38
5.3.60.0410.38642.30
5.3.50.0300.39342.40
5.3.40.0330.38842.41
5.3.30.0482.17842.50
5.3.20.0402.27142.31
5.3.10.0392.26842.30
5.3.00.0452.23742.19

preferences:
43.72 ms | 403 KiB | 5 Q