3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ["a","b","c","d","f"]; $last = null; foreach ($arr as $v) { if ($last !== null) { if (++$last !== $v) { echo $last; break; } } $last = $v; }

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.5.30.0070.01119.64
8.5.20.0070.01118.65
8.5.10.0030.00716.73
8.5.00.0130.01020.16
8.4.180.0120.00919.55
8.4.170.0100.01023.94
8.4.160.0130.00923.98
8.4.150.0070.00516.84
8.4.140.0140.00617.48
8.4.130.0050.00617.69
8.4.120.0100.00622.35
8.4.110.0090.00322.33
8.4.100.0020.00617.88
8.4.90.0150.00518.47
8.4.80.0040.00417.74
8.4.70.0150.00517.69
8.4.60.0120.00818.84
8.4.50.0140.00620.31
8.4.40.0000.00817.48
8.4.30.0060.01320.25
8.4.20.0140.00717.82
8.4.10.0030.00619.12
8.3.300.0120.00820.67
8.3.290.0100.00920.82
8.3.280.0130.00918.50
8.3.270.0130.00716.60
8.3.260.0080.01116.48
8.3.250.0080.01019.17
8.3.240.0130.00616.38
8.3.230.0070.01016.66
8.3.220.0030.00417.05
8.3.210.0050.00316.76
8.3.200.0040.00416.67
8.3.190.0030.00619.18
8.3.180.0100.00818.51
8.3.170.0090.00917.05
8.3.160.0130.00618.55
8.3.150.0090.00920.87
8.3.140.0090.00916.80
8.3.130.0030.00518.55
8.3.120.0040.00418.82
8.3.110.0050.00320.94
8.3.100.0120.00324.06
8.3.90.0040.00426.77
8.3.80.0040.00417.97
8.3.70.0060.01616.63
8.3.60.0090.00618.55
8.3.50.0060.01516.54
8.3.40.0070.01121.86
8.3.30.0040.01118.96
8.3.20.0000.00724.18
8.3.10.0000.00824.66
8.3.00.0000.00826.16
8.2.300.0090.01118.23
8.2.290.0100.00822.30
8.2.280.0120.00722.24
8.2.270.0040.01017.00
8.2.260.0090.00918.80
8.2.250.0090.00018.27
8.2.240.0100.00016.99
8.2.230.0130.00322.58
8.2.220.0090.00037.54
8.2.210.0110.00726.77
8.2.200.0060.00316.38
8.2.190.0120.00316.58
8.2.180.0150.00318.16
8.2.170.0120.00618.96
8.2.160.0100.00322.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00820.79
8.2.110.0030.00720.43
8.2.100.0040.00818.44
8.2.90.0240.00718.44
8.2.80.0270.00518.44
8.2.70.0240.01018.44
8.2.60.0290.00318.44
8.2.50.0260.00618.44
8.2.40.0130.00918.91
8.2.30.0210.00618.44
8.2.20.0290.00018.44
8.2.10.0140.01418.44
8.2.00.0260.00018.44
8.1.340.0090.01121.61
8.1.330.0090.00921.93
8.1.320.0140.00515.95
8.1.310.0150.00316.54
8.1.300.0000.00818.26
8.1.290.0030.00630.84
8.1.280.0100.00725.92
8.1.270.0040.00422.07
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00620.99
8.1.230.0100.00919.02
8.1.220.0240.00318.44
8.1.210.0240.00418.44
8.1.200.0270.00018.44
8.1.190.0250.00318.44
8.1.180.0140.01118.44
8.1.170.0160.01218.44
8.1.160.0230.00518.44
8.1.150.0220.00618.44
8.1.140.0220.00818.44
8.1.130.0290.00018.44
8.1.120.0290.00018.44
8.1.110.0230.00518.93
8.1.100.0290.00018.44
8.1.90.0190.01018.92
8.1.80.0200.00718.44
8.1.70.0190.01118.44
8.1.60.0260.00318.44
8.1.50.0230.00319.01
8.1.40.0250.00018.44
8.1.30.0240.00618.44
8.1.20.0230.00318.44
8.1.10.0190.00818.44
8.1.00.0230.00418.44
8.0.300.0230.00718.44
8.0.290.0270.00318.44
8.0.280.0190.00618.44
8.0.270.0200.01118.44
8.0.260.0170.00818.44
8.0.250.0170.00318.44
8.0.240.0130.00918.44
8.0.230.0200.00418.44
8.0.220.0250.00018.44
8.0.210.0250.00318.44
8.0.200.0090.01318.44
8.0.190.0240.00018.44
8.0.180.0220.00018.44
8.0.170.0170.00618.44
8.0.160.0120.01118.44
8.0.150.0140.00918.44
8.0.140.0220.00418.44
8.0.130.0150.01018.44
8.0.120.0240.00318.44
8.0.110.0170.00818.44
8.0.100.0160.00618.44
8.0.90.0140.00718.44
8.0.80.0180.00418.44
8.0.70.0190.00518.44
8.0.60.0190.00018.44
8.0.50.0150.00918.44
8.0.30.0260.00018.44
8.0.20.0070.01618.44
8.0.10.0190.00518.44
7.0.00.0260.00625.92

preferences:
84.74 ms | 1101 KiB | 5 Q