3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array(1, 2, 3, 4, 5); while ( $item = current($items) ) { echo $item."\n"; if ( $item == 2 ) { $item = 9; prev($items); } next($items); }

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.0380.00318.36
8.3.50.0360.01721.89
8.3.40.0350.01318.57
8.3.30.0360.01019.21
8.3.20.0130.01020.38
8.3.10.0230.00020.37
8.3.00.0140.01019.68
8.2.180.0340.01718.16
8.2.170.0430.01022.96
8.2.160.0290.01320.47
8.2.150.0170.00724.18
8.2.140.0110.01124.66
8.2.130.0100.01026.16
8.2.120.0240.00322.09
8.2.110.0200.01020.85
8.2.100.0320.00617.72
8.2.90.0120.00419.09
8.2.80.0030.01317.97
8.2.70.0160.00617.63
8.2.60.0110.01117.93
8.2.50.0120.00618.07
8.2.40.0100.00718.16
8.2.30.0100.00619.40
8.2.20.0100.00717.64
8.2.10.0140.00418.23
8.2.00.0090.00917.69
8.1.280.0370.00725.92
8.1.270.0210.00322.05
8.1.260.0180.00426.35
8.1.250.0140.00728.09
8.1.240.0190.00922.20
8.1.230.0230.01318.91
8.1.220.0070.01017.74
8.1.210.0000.01618.77
8.1.200.0070.01317.36
8.1.190.0120.00417.23
8.1.180.0140.00418.10
8.1.170.0090.01218.54
8.1.160.0160.00022.13
8.1.150.0100.00618.89
8.1.140.0100.00717.57
8.1.130.0060.00917.89
8.1.120.0130.00317.54
8.1.110.0160.00317.47
8.1.100.0090.00617.43
8.1.90.0100.00717.61
8.1.80.0040.01117.41
8.1.70.0110.00417.44
8.1.60.0070.01117.53
8.1.50.0100.01017.62
8.1.40.0060.01317.52
8.1.30.0090.00617.66
8.1.20.0070.01017.55
8.1.10.0040.01417.49
8.1.00.0100.00617.41
8.0.300.0090.00918.77
8.0.290.0080.00816.63
8.0.280.0140.00318.32
8.0.270.0130.00317.24
8.0.260.0100.00717.04
8.0.250.0090.00616.88
8.0.240.0070.01016.76
8.0.230.0000.01416.82
8.0.220.0040.01116.79
8.0.210.0090.00616.72
8.0.200.0040.01116.78
8.0.190.0120.00316.79
8.0.180.0150.00416.82
8.0.170.0090.00916.92
8.0.160.0080.00816.68
8.0.150.0070.01116.68
8.0.140.0130.01216.69
8.0.130.0120.00313.30
8.0.120.0150.00416.86
8.0.110.0130.00316.80
8.0.100.0060.00916.79
8.0.90.0190.00016.64
8.0.80.0280.02216.81
8.0.70.0120.00416.73
8.0.60.0070.00716.64
8.0.50.0060.00916.72
8.0.30.0510.03817.01
8.0.20.0770.05117.40
8.0.10.0040.01116.75
8.0.00.0570.04116.68
7.4.330.0100.00315.07
7.4.320.0110.00416.28
7.4.300.0000.01416.36
7.4.290.0030.01416.34
7.4.280.0030.01516.46
7.4.270.0130.00416.34
7.4.260.0130.00716.30
7.4.250.0100.00716.35
7.4.240.0090.00616.39
7.4.230.0100.00316.45
7.4.220.0240.04416.43
7.4.210.0370.03016.55
7.4.200.0080.00516.54
7.4.160.0600.01716.53
7.4.150.0560.03617.40
7.4.140.0600.03017.86
7.4.130.0620.04216.32
7.4.120.0550.03316.52
7.4.110.0390.04216.49
7.4.100.0450.04216.54
7.4.90.0530.03716.27
7.4.80.0780.02616.30
7.4.70.0630.02116.39
7.4.60.0360.03016.33
7.4.50.0140.01116.23
7.4.40.0450.05316.46
7.4.30.0470.03016.36
7.4.00.0230.01314.89
7.3.330.0060.01013.19
7.3.320.0030.01012.89
7.3.310.0030.01215.95
7.3.300.0070.00716.05
7.3.290.0220.02916.03
7.3.280.0290.04216.06
7.3.270.0550.04017.40
7.3.260.0540.03016.36
7.3.250.0430.05116.25
7.3.240.0540.05016.21
7.3.230.0490.04916.50
7.3.210.0600.03016.36
7.3.200.0470.03219.39
7.3.190.0370.03416.10
7.3.180.0440.04416.48
7.3.170.0460.02616.49
7.3.160.0420.03016.25
7.2.330.0430.03616.59
7.2.320.0600.02516.61
7.2.310.0450.05816.62
7.2.300.0460.03316.45
7.2.290.0230.05416.79
7.2.60.0260.00616.98
7.1.200.0240.00915.77
7.1.100.0130.01317.66
7.1.70.0070.01117.05
7.1.60.0220.00319.32
7.1.50.0310.02016.93
7.0.200.0150.00916.80

preferences:
38.36 ms | 401 KiB | 5 Q