3v4l.org

run code in 300+ 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"]));

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.4.120.0060.01416.26
7.4.110.0110.00716.19
7.4.100.0150.00416.28
7.4.90.0090.01316.44
7.4.80.0130.00716.18
7.4.70.0150.00616.38
7.4.60.0080.00816.16
7.4.50.0110.01116.38
7.4.40.0150.00616.36
7.4.30.0190.00016.07
7.4.20.0120.00816.40
7.4.10.0130.00716.21
7.4.00.0070.01116.45
7.3.240.0140.00316.15
7.3.230.0180.00016.19
7.3.220.0070.01416.19
7.3.210.0130.00616.25
7.3.200.0100.00715.95
7.3.190.0170.00816.28
7.3.180.0140.00616.07
7.3.170.0090.00916.09
7.3.160.0160.00616.20
7.3.150.0170.00316.20
7.3.140.0090.00916.23
7.3.130.0040.01416.04
7.3.120.0130.00516.13
7.3.110.0150.00616.29
7.3.100.0060.01316.19
7.3.90.0100.01415.91
7.3.80.0100.01316.07
7.3.70.0070.01116.13
7.3.60.0080.00816.11
7.3.50.0080.00816.15
7.3.40.0060.01016.03
7.3.30.0120.00616.18
7.3.20.0190.00816.26
7.3.10.0070.01716.07
7.3.00.0210.00616.09
7.2.340.0180.00316.29
7.2.330.0110.00816.25
7.2.320.0060.01416.21
7.2.310.0150.00616.32
7.2.300.0150.00316.42
7.2.290.0170.00316.26
7.2.280.0100.01016.00
7.2.270.0150.00316.18
7.2.260.0060.01516.38
7.2.250.0070.01116.11
7.2.240.0260.00016.07
7.2.230.0100.00715.86
7.2.220.0130.01016.12
7.2.210.0140.00816.29
7.2.200.0140.00516.37
7.2.190.0070.01116.48
7.2.180.0060.01016.27
7.2.170.0040.01316.31
7.2.160.0040.01616.14
7.2.150.0150.00616.20
7.2.140.0060.01316.20
7.2.130.0030.01816.23
7.2.120.0120.00616.12
7.2.110.0130.00716.19
7.2.100.0180.00916.37
7.2.90.0070.01016.12
7.2.80.0100.01016.09
7.2.70.0180.00016.14
7.2.60.0060.01216.25
7.2.50.0130.00516.17
7.2.40.0090.01316.21
7.2.30.0190.00316.27
7.2.20.0150.00916.39
7.2.10.0080.01316.13
7.2.00.0140.00916.11
7.1.330.0240.00415.42
7.1.320.0200.01215.38
7.1.310.0170.01115.37
7.1.300.0210.00715.48
7.1.290.0170.01215.28
7.1.280.0250.00315.27
7.1.270.0200.00815.15
7.1.260.0140.01415.19
7.1.250.0260.00315.36
7.1.240.0440.00715.34
7.1.230.0190.01115.30
7.1.220.0260.00515.19
7.1.210.0160.01015.31
7.1.200.0250.00415.42
7.1.190.0150.01515.22
7.1.180.0160.00815.39
7.1.170.0170.00715.23
7.1.160.0150.01215.13
7.1.150.0350.00615.19
7.1.140.0220.00815.17
7.1.130.0200.00715.30
7.1.120.0210.00815.13
7.1.110.0180.01015.37
7.1.100.0250.00615.25
7.1.90.0240.00915.34
7.1.80.0250.01115.47
7.1.70.0250.00915.30
7.1.60.0210.00915.32
7.1.50.0230.01215.25
7.1.40.0230.00415.24
7.1.30.0230.00715.30
7.1.20.0180.00915.09
7.1.10.0180.01315.22
7.1.00.0200.01015.14
7.0.330.0210.00614.93
7.0.320.0230.01915.13
7.0.310.0130.01314.95
7.0.300.0220.00614.93
7.0.290.0200.01015.01
7.0.280.0240.01015.04
7.0.270.0290.00015.02
7.0.260.0120.01015.23
7.0.250.0210.00315.09
7.0.240.0180.00915.09
7.0.230.0200.01114.92
7.0.220.0170.00615.05
7.0.210.0140.00315.04
7.0.200.0360.01314.93
7.0.190.0090.00914.96
7.0.180.0120.00915.02
7.0.170.0160.00515.09
7.0.160.0150.00914.82
7.0.150.0170.00914.68
7.0.140.0240.01115.14
7.0.130.0230.00314.92
7.0.120.0200.00814.96
7.0.110.0280.04617.48
7.0.100.0210.05017.43
7.0.90.0310.04117.47
7.0.80.0320.03317.54
7.0.70.0250.04317.49
7.0.60.0280.04518.37
7.0.50.0300.03718.47
7.0.40.0410.04018.51
7.0.30.0140.04618.54
7.0.20.0170.04918.41
7.0.10.0170.04218.47
7.0.00.0150.04518.53
5.6.400.0250.01415.68
5.6.390.0180.01215.67
5.6.380.0210.00615.59
5.6.370.0280.01115.61
5.6.360.0270.00015.59
5.6.350.0190.00915.79
5.6.340.0190.01015.79
5.6.330.0120.00915.66
5.6.320.0080.01515.75
5.6.310.0120.00915.89
5.6.300.0290.00715.76
5.6.290.0300.00515.84
5.6.280.0120.01215.44
5.6.270.0200.00715.59
5.6.260.0180.04018.27
5.6.250.0220.03918.23
5.6.240.0190.04218.20
5.6.230.0170.03618.10
5.6.220.0200.02918.25
5.6.210.0150.05318.88
5.6.200.0220.04119.19
5.6.190.0190.04019.38
5.6.180.0100.04519.34
5.6.170.0160.03819.23
5.6.160.0140.04319.21
5.6.150.0170.04019.32
5.6.140.0180.04319.32
5.6.130.0140.05019.28
5.6.120.0150.04119.24
5.6.110.0130.04119.34
5.6.100.0140.04019.16
5.6.90.0090.05019.29
5.6.80.0150.04118.86
5.6.70.0090.04318.81
5.6.60.0150.03618.80
5.6.50.0150.04218.98
5.6.40.0170.04118.84
5.6.30.0160.03818.93
5.6.20.0150.04218.87
5.6.10.0180.03618.79
5.6.00.0140.03918.80
5.5.380.0210.03017.92
5.5.370.0110.04018.12
5.5.360.0230.04317.91
5.5.350.0120.05518.87
5.5.340.0200.04119.02
5.5.330.0130.04819.15
5.5.320.0190.04119.06
5.5.310.0230.03819.19
5.5.300.0140.05119.19
5.5.290.0160.04319.17
5.5.280.0170.04519.10
5.5.270.0180.04119.16
5.5.260.0140.04719.04
5.5.250.0180.04318.99
5.5.240.0210.04118.73
5.5.230.0190.03518.74
5.5.220.0250.03218.67
5.5.210.0160.04418.67
5.5.200.0170.04518.62
5.5.190.0160.05418.65
5.5.180.0180.04418.63
5.5.170.0150.01615.78
5.5.160.0150.03918.61
5.5.150.0200.03918.67
5.5.140.0170.03718.69
5.5.130.0130.04618.80
5.5.120.0230.03518.68
5.5.110.0130.04218.67
5.5.100.0220.03518.54
5.5.90.0180.03618.59
5.5.80.0170.03718.59
5.5.70.0190.03818.60
5.5.60.0160.03818.56
5.5.50.0210.04018.60
5.5.40.0190.03918.62
5.5.30.0160.04118.63
5.5.20.0170.03918.62
5.5.10.0180.04118.55
5.5.00.0140.04118.48

preferences:
146.97 ms | 1394 KiB | 7 Q