3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo sprintf("\n%.1fMB", memory_get_usage(true) / 1024 / 1024); // allocate a large byte string of around 5 MB $a = str_repeat("0", 5 * 1024 * 1024); echo sprintf("\n%.1fMB", memory_get_usage(true) / 1024 / 1024); // setting the memory limit lower than the current is accepted ini_set("memory_limit", "3M"); echo sprintf("\n%.1fMB", memory_get_usage(true) / 1024 / 1024); // further allocation beyond the limit $b = str_repeat("0", 5 * 1024 * 1024); echo sprintf("\n%.1fMB", memory_get_usage(true) / 1024 / 1024);

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.1.10.0090.00527.26
8.0.80.0180.01026.58
8.0.70.0250.01226.45
8.0.60.0300.01426.43
8.0.50.0260.01626.49
8.0.30.0220.01226.50
8.0.20.0220.00926.52
8.0.10.0220.01226.57
8.0.00.0180.01226.63
7.4.210.0150.01026.12
7.4.200.0200.01626.27
7.4.190.0330.00626.09
7.4.180.0150.00726.15
7.4.160.0220.00726.28
7.4.150.0230.00826.10
7.4.140.0220.01026.12
7.4.130.0210.00926.15
7.4.120.0220.00626.12
7.4.110.0260.01026.09
7.4.100.0200.01226.21
7.4.90.0200.01326.00
7.4.80.0200.01226.17
7.4.70.0210.00926.02
7.4.60.0200.00926.16
7.4.50.0230.00626.04
7.4.40.0180.01226.09
7.4.30.0180.00926.08
7.4.20.0200.01126.09
7.4.10.0170.01226.06
7.4.00.0200.00726.11
7.3.290.0340.00325.92
7.3.280.0200.01125.84
7.3.270.0180.01225.99
7.3.260.0160.01325.89
7.3.250.0200.00825.81
7.3.240.0210.00925.87
7.3.230.0130.01425.88
7.3.220.0210.00925.79
7.3.210.0180.01125.78
7.3.200.0220.01025.84
7.3.190.0170.01325.78
7.3.180.0200.01425.84
7.3.170.0210.01125.81
7.3.160.0240.00825.86
7.3.150.0230.01225.84
7.3.140.0230.01025.80
7.3.130.0200.01225.78
7.3.120.0220.00925.80
7.3.110.0200.01025.77
7.3.100.0170.01225.75
7.3.90.0140.00921.08
7.3.80.0150.01020.88
7.3.70.0140.01021.13
7.3.60.0170.00821.14
7.3.50.0170.00721.12
7.3.40.0140.00721.14
7.3.30.0150.01221.10
7.3.20.0170.00521.22
7.3.10.0170.00921.04
7.3.00.0170.00821.06

preferences:
35.33 ms | 401 KiB | 5 Q