3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xrange($start, $end, $step = 1) { for ($i = $start; $i <= $end; $i += $step) { yield $i; } } foreach (xrange(1, 5) as $i) { echo "$i\n"; } // Po dobu 0.1 sekundy vypisuje čísla. $start = microtime(true); foreach (xrange(1, INF) as $i) { if (microtime(true) - $start > 20) { break; } echo "$i\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.100.0660.03714.43
7.2.90.2760.01714.23
7.2.80.1410.02314.63
7.2.70.1790.02314.84
7.2.60.1450.01614.69
7.2.50.2120.01314.96
7.2.40.1060.02214.85
7.2.30.0290.02914.57
7.2.20.0400.03614.79
7.2.10.1360.03514.70
7.2.00.0480.02514.94
7.1.220.0480.02513.65
7.1.210.0340.03513.70
7.1.200.1250.02313.83
7.1.190.1830.02313.89
7.1.180.1220.02313.66
7.1.170.1920.02013.61
7.1.160.1350.01713.39
7.1.150.1430.02313.51
7.1.140.0370.02213.65
7.1.130.0290.04213.59
7.1.120.0350.02313.92
7.1.110.1950.03813.51
7.1.100.0680.03113.54
7.1.90.1320.02413.48
7.1.80.0910.03313.25
7.1.70.0800.02013.88
7.1.60.0720.01131.95
7.1.50.1270.02232.04
7.1.40.0440.02631.95
7.1.30.0680.02731.92
7.1.20.0930.02132.09
7.1.10.0500.01513.73
7.1.00.0400.02513.71
7.0.310.2430.01913.62
7.0.300.1260.02513.42
7.0.290.1590.02913.34
7.0.280.1790.01613.28
7.0.270.1540.02713.32
7.0.260.2310.00713.54
7.0.250.0500.01713.54
7.0.240.1640.01713.39
7.0.230.2090.02413.27
7.0.220.0580.02013.21
7.0.210.1000.03713.02
7.0.200.0220.03813.32
7.0.190.0590.02613.48
7.0.180.0360.01313.15
7.0.170.0670.02213.69
7.0.160.0590.01713.64
7.0.150.0320.03113.54
7.0.140.0710.02113.38
7.0.130.0950.02313.45
7.0.120.0610.01713.65
7.0.110.1390.01613.51
7.0.100.0370.00713.43
7.0.90.1170.01713.39
7.0.80.0650.03313.48
7.0.70.0410.01413.61
7.0.60.0680.01713.55
7.0.50.0750.02213.64
7.0.40.0380.02413.75
7.0.30.0370.02613.47
7.0.20.1110.01413.42
7.0.10.0180.01913.53
7.0.00.0250.01213.45
5.6.380.0200.03814.49
5.6.370.0450.03014.22
5.6.360.0310.03414.54
5.6.350.0280.03513.90
5.6.340.0290.03214.54
5.6.330.0270.03914.22
5.6.320.0550.02913.90
5.6.310.0180.05114.14
5.6.300.0360.02914.58
5.6.290.0270.03513.93
5.6.280.0480.02214.04
5.6.270.0360.04314.05
5.6.260.0340.02113.94
5.6.250.0070.03014.06
5.6.240.0280.00314.39
5.6.230.0290.01214.30
5.6.220.0460.02814.05
5.6.210.0520.02114.19
5.6.200.0230.01013.94
5.6.190.0170.04514.27
5.6.180.0110.02214.18
5.6.170.0420.00813.90
5.6.160.0180.02114.17
5.6.150.0470.02613.79
5.6.140.0130.03514.16
5.6.130.0280.01014.21
5.6.120.0310.01514.30
5.6.110.0280.03414.26
5.6.100.0200.02614.13
5.6.90.0250.02514.39
5.6.80.0400.02014.07
5.6.70.0520.02313.91
5.6.60.0240.01314.21
5.6.50.0270.02414.15
5.6.40.0410.02114.36
5.6.30.0200.03214.12
5.5.380.0120.01612.66
5.5.370.0340.02812.66
5.5.360.0300.02812.66
5.5.350.0340.02712.66
5.5.340.0340.03912.66
5.5.330.0350.02212.66
5.5.320.0140.01712.66
5.5.310.0340.03412.66
5.5.300.0370.03412.66
5.5.290.0380.02912.66
5.5.280.0320.01012.66
5.5.270.0480.02612.66
5.5.260.0170.01812.66
5.5.250.0130.03512.66
5.5.240.0170.01712.66
5.5.230.0230.00912.66
5.5.220.0330.02112.66
5.5.210.0070.02612.66
5.5.200.0240.04812.66
5.5.190.0550.01512.66
5.4.450.0050.00812.66
5.4.440.0130.00012.66
5.4.430.0070.00712.66
5.4.420.0120.00012.66
5.4.410.0090.00312.66
5.4.400.0110.00012.66
5.4.390.0030.00912.66
5.4.380.0110.00012.66
5.4.370.0060.00612.66
5.4.360.0160.00012.66

preferences:
28.83 ms | 400 KiB | 5 Q