3v4l.org

run code in 200+ PHP versions simultaneously
<?php function RecordsToList(Countable & Traversable $input): String { if (count($input) > 0) { $output = "<ol>\n"; foreach ($input as $value) { $output .= "\t<li>" . htmlentities($value) . "</li>\n"; } $output .= "</ol>\n"; return $output; } else { return "<p>No items to display.</p>\n"; } } echo RecordsToList(new ArrayObject(["Lennon", "McCartney", "Starr", "Harrison"]));
based on ZOo5b

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.0.110.0370.08320.00
7.0.100.0270.08319.98
7.0.90.0500.06719.90
7.0.80.0430.05719.90
7.0.70.0330.07719.94
7.0.60.0300.06319.97
7.0.50.0400.04820.26
7.0.40.0330.05520.24
7.0.30.0130.06720.35
7.0.20.0200.06820.25
7.0.10.0230.05720.20
7.0.00.0150.06520.30
5.6.260.0100.07720.63
5.6.250.0270.06720.67
5.6.240.0170.07720.64
5.6.230.0130.06020.47
5.6.220.0170.05320.62
5.6.210.0130.07320.56
5.6.200.0250.05520.99
5.6.190.0220.05521.20
5.6.180.0080.06321.13
5.6.170.0150.05520.93
5.6.160.0150.06021.08
5.6.150.0180.05521.17
5.6.140.0220.06021.14
5.6.130.0150.07321.03
5.6.120.0180.05721.02
5.6.110.0150.05721.07
5.6.100.0180.05220.98
5.6.90.0100.06821.14
5.6.80.0170.05820.58
5.6.70.0100.05820.49
5.6.60.0120.05320.41
5.6.50.0180.05820.55
5.6.40.0150.05820.51
5.6.30.0150.05220.56
5.6.20.0150.05820.55
5.6.10.0150.05220.52
5.6.00.0120.05520.47
5.5.380.0170.05720.32
5.5.370.0100.06020.56
5.5.360.0300.07320.40
5.5.350.0050.08020.39
5.5.340.0200.05520.76
5.5.330.0130.06320.90
5.5.320.0180.05720.84
5.5.310.0270.05020.92
5.5.300.0120.07220.86
5.5.290.0180.05720.97
5.5.280.0150.06220.89
5.5.270.0170.05820.95
5.5.260.0120.06520.83
5.5.250.0150.06220.68
5.5.240.0230.05520.33
5.5.230.0220.04520.31
5.5.220.0220.04820.14
5.5.210.0150.06020.17
5.5.200.0200.06020.18
5.5.190.0150.07520.22
5.5.180.0150.06320.15
5.5.160.0150.05020.15
5.5.150.0200.05220.22
5.5.140.0200.04720.13
5.5.130.0100.06220.32
5.5.120.0250.04720.26
5.5.110.0080.06020.34
5.5.100.0200.05220.03
5.5.90.0170.05020.06
5.5.80.0170.05020.05
5.5.70.0170.05320.09
5.5.60.0150.05220.04
5.5.50.0200.05720.12
5.5.40.0170.05520.17
5.5.30.0120.06020.17
5.5.20.0150.05520.06
5.5.10.0200.05520.13
5.5.00.0130.05520.04