3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users = array_fill(0, 10000, 'name'); function userNames($users) { foreach($users as $user) { yield $user; } } $start = microtime(true) . PHP_EOL; foreach(userNames($users) as $name) { echo $name . PHP_EOL; } echo microtime(true) - $start; unset($start); echo str_repeat(PHP_EOL, 2); $start = microtime(true) . PHP_EOL; foreach($users as $name) { echo $name . PHP_EOL; } echo microtime(true) - $start;

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.1.70.0790.03015.50
7.1.60.0670.01633.68
7.1.50.0540.01633.19
7.1.40.0850.02132.83
7.1.30.0760.02433.29
7.1.20.0770.01633.20
7.1.10.0510.01914.94
7.1.00.0200.00716.45
7.0.200.0210.00815.18
7.0.190.0200.01215.48
7.0.180.0560.01914.75
7.0.170.0140.02715.00
7.0.160.0690.02415.03
7.0.150.0220.00314.91
7.0.140.0200.01416.38
7.0.130.0460.00816.80
7.0.120.0220.01716.50
7.0.110.0220.00916.60
7.0.100.0280.02316.46
7.0.90.0070.02316.58
7.0.80.0250.02816.64
7.0.70.0130.01016.44
7.0.60.0230.02716.18
7.0.50.0900.01014.90
7.0.40.0230.01516.57
7.0.30.0410.01316.69
7.0.20.0250.01516.67
7.0.10.0030.01716.41
7.0.00.0290.01416.27
5.6.300.0330.07822.66
5.6.290.0480.07622.54
5.6.280.0180.05722.96
5.6.270.0280.09022.81
5.6.260.0320.08423.00
5.6.250.0390.07022.80
5.6.240.0130.08822.95
5.6.230.0380.07522.83
5.6.220.0100.07222.52
5.6.210.0360.07422.96
5.6.200.0450.07822.77
5.6.190.0130.07622.74
5.6.180.0220.07922.85
5.6.170.0310.08622.83
5.6.160.0170.07522.55
5.6.150.0370.08222.71
5.6.140.0260.11222.85
5.6.130.0200.08722.76
5.6.120.0160.07922.83
5.6.110.0210.08622.91
5.6.100.0310.08422.71
5.6.90.0160.06122.71
5.6.80.0230.07122.27
5.6.70.0260.06722.30
5.6.60.0470.07122.30
5.6.50.0380.06422.30
5.6.40.0290.06922.31
5.6.30.0140.09022.07
5.6.20.0300.08822.24
5.6.10.0440.07022.10
5.6.00.0130.08022.29
5.5.380.0390.08019.34
5.5.370.0250.05719.49
5.5.360.0430.06619.41
5.5.350.0250.06319.59
5.5.340.0220.07919.97
5.5.330.0310.06620.00
5.5.320.0140.09320.02
5.5.310.0130.06120.01
5.5.300.0580.09419.96
5.5.290.0190.07519.61
5.5.280.0260.06819.94
5.5.270.0200.05619.93
5.5.260.0410.06719.71
5.5.250.0200.06319.71
5.5.240.0230.05518.87
5.5.230.0300.06719.25
5.5.220.0110.08119.39
5.5.210.0290.06419.29
5.5.200.0330.08219.29
5.5.190.0200.07919.28
5.5.180.0280.09319.25
5.5.160.0250.06518.96
5.5.150.0400.05919.27
5.5.140.0420.08819.28
5.5.130.0240.06519.34
5.5.120.0400.09119.30
5.5.110.0260.07019.31
5.5.100.0290.08318.97
5.5.90.0390.07919.15
5.5.80.0190.08319.22
5.5.70.0380.08019.21
5.5.60.0300.07319.18
5.5.50.0240.04919.16
5.5.40.0280.07118.86
5.5.30.0290.07619.06
5.5.20.0130.06619.20
5.5.10.0130.07519.19
5.5.00.0210.05819.05
5.4.450.0240.06419.39
5.4.440.0160.06019.47
5.4.430.0180.04719.56
5.4.420.0060.07019.24
5.4.410.0110.06119.18
5.4.400.0070.05818.93
5.4.390.0100.07318.97
5.4.380.0160.06719.01
5.4.370.0090.05419.01
5.4.360.0130.06618.91
5.4.350.0130.07018.98
5.4.340.0060.07819.03
5.4.320.0190.05918.95
5.4.310.0240.06318.98
5.4.300.0100.06719.00
5.4.290.0140.07019.02
5.4.280.0200.07018.90
5.4.270.0180.06619.00
5.4.260.0260.05618.91
5.4.250.0160.07119.09
5.4.240.0110.08119.04
5.4.230.0190.06719.01
5.4.220.0110.06919.09
5.4.210.0200.05318.86
5.4.200.0170.06819.09
5.4.190.0230.06118.86
5.4.180.0150.07418.90
5.4.170.0150.05218.91
5.4.160.0060.07719.01
5.4.150.0230.06819.13
5.4.140.0140.07116.70
5.4.130.0320.05516.48
5.4.120.0140.04414.20
5.4.110.0180.05814.32
5.4.100.0130.05314.22
5.4.90.0100.05714.34
5.4.80.0090.05414.20
5.4.70.0190.04914.28
5.4.60.0130.05414.33
5.4.50.0100.07014.31
5.4.40.0120.05014.33
5.4.30.0130.04814.30
5.4.20.0180.04614.30
5.4.10.0170.05314.19
5.4.00.0130.04313.81
5.3.290.0150.06414.95
5.3.280.0170.06414.89
5.3.270.0120.05614.66
5.3.260.0240.06014.78
5.3.250.0180.05914.66
5.3.240.0180.06414.89
5.3.230.0180.06114.65
5.3.220.0130.04913.77
5.3.210.0110.06013.56
5.3.200.0210.06413.57
5.3.190.0190.05213.76
5.3.180.0200.04913.66
5.3.170.0170.06813.65
5.3.160.0120.05513.55
5.3.150.0140.05713.71
5.3.140.0140.06113.69
5.3.130.0130.04913.60
5.3.120.0130.05313.54
5.3.110.0120.04813.63
5.3.100.0130.04713.17
5.3.90.0120.04813.21
5.3.80.0100.05013.14
5.3.70.0180.05713.08
5.3.60.0130.04613.03
5.3.50.0130.04813.12
5.3.40.0150.06313.07
5.3.30.0150.05113.10
5.3.20.0140.04812.78
5.3.10.0160.04812.84
5.3.00.0160.06612.70

preferences:
37.9 ms | 401 KiB | 5 Q