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_key(array_flip($data1), array_flip($data2)); $time = microtime(true) - $time; echo 'array_diff() took ' . number_format($time, 3) . ' seconds and returned ' . count($data_diff1) . " entries\n";

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)
7.2.00.0130.05337.48
7.1.70.0030.06035.19
7.1.60.0170.09034.85
7.1.50.0160.08434.75
7.1.00.0070.13740.24
7.0.200.0030.05434.76
7.0.140.0030.14340.07
7.0.60.0200.11737.32
7.0.50.0130.12035.06
7.0.40.0070.10329.73
7.0.30.0700.11729.61
7.0.20.0500.14029.61
7.0.10.0270.14329.84
7.0.00.0130.08729.62
5.6.280.0230.19373.89
5.6.210.0330.18373.40
5.6.200.0230.18370.88
5.6.190.0200.19773.20
5.6.180.0470.16373.20
5.6.170.0500.21073.03
5.6.160.0300.13773.00
5.6.150.0200.12370.82
5.6.140.0170.16070.87
5.6.130.0230.18770.87
5.6.120.0100.15073.77
5.6.110.0230.19773.70
5.6.100.0130.17773.75
5.6.90.0300.17373.69
5.6.80.0170.18773.12
5.6.70.0230.18773.11
5.5.350.0170.17773.04
5.5.340.0170.14370.48
5.5.330.0430.13072.90
5.5.320.0500.15372.93
5.5.310.0500.12772.89
5.5.300.0130.14070.70
5.5.290.0330.19070.72
5.5.280.0130.20073.71
5.5.270.0370.19373.47
5.5.260.0370.18073.57
5.5.250.0100.20373.52
5.5.240.0200.20072.90
5.4.450.0430.15372.25
5.4.440.0230.14372.05
5.4.430.0530.16072.01
5.4.420.2570.00071.93
5.4.410.2370.00071.91
5.4.400.2500.00071.64
5.4.390.2670.00071.74
5.4.380.2670.00071.62
5.4.370.2570.00071.72
5.4.360.2470.00071.64
5.4.350.2470.00071.86
5.4.340.2370.00071.68
5.4.320.0270.12965.20
5.4.310.0210.14165.19
5.4.300.0210.14165.19
5.4.290.0200.14965.19
5.4.280.0250.14365.09
5.4.270.0270.14365.09
5.4.260.0190.14565.09
5.4.250.0210.15165.09
5.4.240.0230.13865.09
5.4.230.0240.15165.08
5.4.220.0290.16865.08
5.4.210.0220.14365.08
5.4.200.0280.14665.08
5.4.190.0220.15365.08
5.4.180.0180.15165.08
5.4.170.0150.16565.09
5.4.160.0260.16065.08
5.4.150.0210.15465.08
5.4.140.0180.22364.76
5.4.130.0200.17064.75
5.4.120.0200.15864.71
5.4.110.0250.21264.71
5.4.100.0240.15564.71
5.4.90.0190.18464.71
5.4.80.0160.14964.71
5.4.70.0240.13764.70
5.4.60.0180.14764.70
5.4.50.0250.15864.70
5.4.40.0210.14964.69
5.4.30.0240.17564.69
5.4.20.0280.16864.69
5.4.10.0220.14764.69
5.4.00.0190.14964.18
5.3.290.0200.15363.27
5.3.280.0190.15163.20
5.3.270.0150.16363.21
5.3.260.0190.16063.21
5.3.250.0210.15563.21
5.3.240.0230.15863.21
5.3.230.0190.16563.20
5.3.220.0220.14263.17
5.3.210.0210.16363.17
5.3.200.0190.15563.17
5.3.190.0310.15963.17
5.3.180.0240.15463.17
5.3.170.0250.14663.16
5.3.160.0230.14663.16
5.3.150.0210.15463.16
5.3.140.0210.15563.16
5.3.130.0270.17863.15
5.3.120.0190.14663.15
5.3.110.0280.14563.15
5.3.100.0220.14862.64
5.3.90.0250.13762.62
5.3.80.0170.16062.61
5.3.70.0220.16662.61
5.3.60.0230.15162.60
5.3.50.0190.14762.54
5.3.40.0230.15362.54
5.3.30.0180.14262.50
5.3.20.0220.13862.29
5.3.10.0180.14462.25
5.3.00.0200.14562.23
5.2.170.0210.14057.89
5.2.160.0190.14357.89
5.2.150.0290.12857.89
5.2.140.0200.15357.89
5.2.130.0140.16257.85
5.2.120.0230.15257.85
5.2.110.0200.14658.32
5.2.100.0210.18957.85
5.2.90.0210.15757.85
5.2.80.0240.16457.84
5.2.70.0220.16157.84
5.2.60.0210.14957.79
5.2.50.0120.18857.72
5.2.40.0140.27258.47
5.2.30.0180.27158.45
5.2.20.0270.42958.44
5.2.10.0190.39658.36
5.2.00.0250.42558.22
5.1.60.0220.46072.67
5.1.50.0310.43772.67
5.1.40.0230.45672.66
5.1.30.0300.45473.00
5.1.20.0220.45373.02
5.1.10.0340.46772.75
5.1.00.0270.45672.75
5.0.50.0120.31336.74
5.0.40.0150.29336.59
5.0.30.0110.31036.41
5.0.20.0100.28636.37
5.0.10.0170.28136.35
5.0.00.0180.30236.34
4.4.90.0210.37834.77
4.4.80.0150.30334.75
4.4.70.0140.28234.75
4.4.60.0240.29034.75
4.4.50.0090.27834.77
4.4.40.0230.28734.76
4.4.30.0090.28334.75
4.4.20.0110.29134.82
4.4.10.0180.28434.82
4.4.00.0130.29634.79
4.3.110.0060.29734.69
4.3.100.0140.29934.68
4.3.90.0130.31034.66
4.3.80.0190.30734.67
4.3.70.0090.30634.65
4.3.60.0190.29734.66
4.3.50.0090.29834.66
4.3.40.0090.31234.61
4.3.30.0140.29233.43
4.3.20.0160.28533.41
4.3.10.0130.29833.36
4.3.00.0130.35034.58

preferences:
33.31 ms | 400 KiB | 5 Q