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); continue; } 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.40.0330.01018.84
8.3.30.0370.02019.09
8.3.20.0130.01020.34
8.3.10.0130.01020.54
8.3.00.0130.01019.56
8.2.170.0370.01422.96
8.2.160.0330.00720.58
8.2.150.0190.00324.18
8.2.140.0130.01024.66
8.2.130.0190.00426.16
8.2.120.0110.01122.11
8.2.110.0200.01022.25
8.2.100.0160.01619.21
8.2.90.0110.00619.17
8.2.80.0040.01217.97
8.2.70.0120.00917.63
8.2.60.0140.00317.93
8.2.50.0060.01018.07
8.2.40.0100.00618.16
8.2.30.0100.00719.39
8.2.20.0100.00617.77
8.2.10.0100.00718.19
8.2.00.0130.00317.80
8.1.270.0210.00422.19
8.1.260.0160.00626.35
8.1.250.0190.00328.09
8.1.240.0260.01323.91
8.1.230.0200.01619.16
8.1.220.0060.01017.76
8.1.210.0160.00018.77
8.1.200.0030.01617.23
8.1.190.0070.01017.23
8.1.180.0060.01018.10
8.1.170.0130.01018.59
8.1.160.0090.00622.01
8.1.150.0100.00718.87
8.1.140.0120.00417.42
8.1.130.0130.00317.86
8.1.120.0040.01417.52
8.1.110.0110.00717.41
8.1.100.0040.01117.52
8.1.90.0090.00917.45
8.1.80.0090.00917.58
8.1.70.0120.00417.47
8.1.60.0100.00617.65
8.1.50.0060.00917.64
8.1.40.0120.00617.60
8.1.30.0090.00917.66
8.1.20.0100.01017.57
8.1.10.0120.00317.43
8.1.00.0100.00617.48
8.0.300.0070.01018.77
8.0.290.0070.01016.63
8.0.280.0090.00618.38
8.0.270.0130.00317.11
8.0.260.0070.01017.27
8.0.250.0100.00716.86
8.0.240.0030.01216.85
8.0.230.0140.00016.88
8.0.220.0090.00616.77
8.0.210.0070.00716.70
8.0.200.0110.00416.88
8.0.190.0060.00916.86
8.0.180.0070.00716.85
8.0.170.0150.00416.78
8.0.160.0070.00716.72
8.0.150.0100.00716.69
8.0.140.0210.01016.68
8.0.130.0060.01013.34
8.0.120.0140.00616.80
8.0.110.0110.00716.79
8.0.100.0060.00916.64
8.0.90.0090.01016.76
8.0.80.0290.02316.71
8.0.70.0100.00716.78
8.0.60.0030.01016.61
8.0.50.0110.00316.95
8.0.30.0440.04217.17
8.0.20.1010.05717.40
8.0.10.0070.00716.78
8.0.00.0520.04516.62
7.4.330.0110.00415.03
7.4.320.0070.01016.48
7.4.300.0140.00016.48
7.4.290.0150.00316.28
7.4.280.0100.01316.51
7.4.270.0030.01316.38
7.4.260.0130.00316.22
7.4.250.0030.01716.28
7.4.240.0110.00516.37
7.4.230.0070.01016.18
7.4.220.0320.03216.56
7.4.210.0280.03516.56
7.4.200.0130.00016.50
7.4.160.0450.03916.30
7.4.150.0910.03317.40
7.4.140.0790.03717.86
7.4.130.0830.04216.48
7.4.120.0470.04616.36
7.4.110.0380.04116.48
7.4.100.0650.03116.39
7.4.90.0480.03216.65
7.4.80.0490.04916.43
7.4.70.0310.04116.29
7.4.60.0170.05116.53
7.4.50.0190.00616.55
7.4.40.0320.03516.29
7.4.30.0330.04316.52
7.3.330.0130.00013.19
7.3.320.0100.00313.19
7.3.310.0100.00616.05
7.3.300.0100.00616.05
7.3.290.0230.03916.03
7.3.280.0270.03116.11
7.3.270.0480.04817.40
7.3.260.0710.02716.41
7.3.250.0510.03916.24
7.3.240.0650.03116.19
7.3.230.0590.03216.39
7.3.210.0580.02816.41
7.3.200.0690.02919.39
7.3.190.0510.01916.02
7.3.180.0460.04316.04
7.3.170.0280.03616.27
7.3.160.0330.03916.35
7.2.330.0570.04116.57
7.2.320.0200.05916.64
7.2.310.0620.04216.45
7.2.300.0730.05016.38
7.2.290.0590.03316.58
7.2.100.1140.02714.45
7.2.90.0990.02414.47
7.2.80.0410.01814.56
7.2.70.1440.01914.70
7.2.60.0310.03714.84
7.2.50.1500.01814.53
7.2.40.1070.02814.74
7.2.30.1290.03714.81
7.2.20.1170.02514.87
7.2.10.1150.02614.63
7.2.00.0730.02314.73
7.1.220.0530.01013.63
7.1.210.0380.02013.61
7.1.200.1560.01613.65
7.1.190.1520.01913.76
7.1.180.1270.02413.72
7.1.170.1540.02113.78
7.1.160.1310.01513.68
7.1.150.0510.01213.75
7.1.140.0800.03013.72
7.1.130.1080.01513.97
7.1.120.1080.01713.67
7.1.110.0970.03713.79
7.1.100.1920.02214.05
7.1.90.0510.02813.73
7.1.80.0780.02313.63
7.1.70.1180.03613.67
7.1.60.1590.02431.83
7.1.50.0880.02232.06
7.1.40.0510.02931.61
7.1.30.1020.01531.71
7.1.20.1500.02531.59
7.1.10.1360.01313.61
7.1.00.1810.02013.61
7.0.310.0680.04313.61
7.0.300.1610.02813.61
7.0.290.0390.03313.61
7.0.280.1250.03613.61
7.0.270.0280.02813.68
7.0.260.1010.02013.61
7.0.250.0950.02813.69
7.0.240.1470.00613.61
7.0.230.0280.03413.61
7.0.220.1380.02113.69
7.0.210.0470.01913.61
7.0.200.1610.02113.61
7.0.190.0980.02213.61
7.0.180.0330.02313.61
7.0.170.1440.01513.61
7.0.160.0360.01913.61
7.0.150.1440.01613.61
7.0.140.1630.02213.63
7.0.130.0620.00713.61
7.0.120.0390.01613.61
7.0.110.0300.02813.61
7.0.100.0500.02013.61
7.0.90.1750.03913.61
7.0.80.0430.03113.63
7.0.70.0700.01813.61
7.0.60.2230.03813.61
7.0.50.2240.03413.61
7.0.40.2090.02113.61
7.0.30.0930.02113.61
7.0.20.0750.01513.63
7.0.10.1100.02513.61
7.0.00.0810.01713.61
5.6.380.0310.03114.36
5.6.370.0310.02714.32
5.6.360.0380.03614.00
5.6.350.0430.02514.14
5.6.340.0280.03513.61
5.6.330.0390.01914.30
5.6.320.0340.02214.30
5.6.310.0320.03914.02
5.6.300.0250.02914.24
5.6.290.0380.02814.34
5.6.280.0420.02913.89
5.6.270.0270.03914.10
5.6.260.0410.02114.30
5.6.250.0320.02514.38
5.6.240.0240.04114.17
5.6.230.0360.03214.21
5.6.220.0290.02614.29
5.6.210.0300.04814.06
5.6.200.0360.02514.15
5.6.190.0340.03714.25
5.6.180.0360.01814.24
5.6.170.0350.02714.02
5.6.160.0360.02014.54
5.6.150.0240.04114.29
5.6.140.0300.02614.15
5.6.130.0450.02414.13
5.6.120.0470.01314.11
5.6.110.0340.02613.89
5.6.100.0330.02714.35
5.6.90.0280.02814.19
5.6.80.0390.05514.05
5.6.70.0530.02714.34
5.6.60.0430.02314.13
5.5.380.0490.01113.61
5.5.370.0370.02713.61
5.5.360.0310.02513.61
5.5.350.0350.03113.61
5.5.340.0310.02113.61
5.5.330.0290.02913.61
5.5.320.0430.01913.61
5.5.310.0270.03113.61
5.5.300.0220.05313.61
5.5.290.0410.01513.61
5.5.280.0330.02613.61
5.5.270.0320.02813.61
5.5.260.0300.02413.61
5.5.250.0330.02713.61
5.5.240.0300.01813.61
5.5.230.0370.01813.61
5.5.220.0330.02313.61
5.4.450.0400.03113.61
5.4.440.0410.03013.61
5.4.430.0290.02513.61
5.4.420.0350.01813.61
5.4.410.0260.03513.61
5.4.400.0330.02513.61
5.4.390.0320.02913.61

preferences:
38.69 ms | 400 KiB | 5 Q