3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); // Custom error handler. function handle_error($code, $message, $file, $line, $context) { $code = $code & error_reporting(); if ($code == 0) { // skip @ suppressed errors. return; } $errors = array( E_ERROR => 'E_ERROR', E_WARNING => 'E_WARNING', E_PARSE => 'E_PARSE', E_NOTICE => 'E_NOTICE', E_CORE_ERROR => 'E_CORE_ERROR', E_CORE_WARNING => 'E_CORE_WARNING', E_COMPILE_ERROR => 'E_COMPILE_ERROR', E_COMPILE_WARNING => 'E_COMPILE_WARNING', E_USER_ERROR => 'E_USER_ERROR', E_USER_WARNING => 'E_USER_WARNING', E_USER_NOTICE => 'E_USER_NOTICE', E_STRICT => 'E_STRICT', E_DEPRECATED => 'E_DEPRECATED', ); if (array_key_exists($code, $errors)) { $errname = $errors[$code]; } else { $errname = $code; } $error = "Error handler caught $errname with message \"" . $message . '" at ' . $file . ' line ' . $line . ".\n"; error_log($error); eval(<<<'PHP' function bla() { print "You should see this.\n"; } PHP ); bla($error); return; } set_error_handler('handle_error'); // This fails because bla.php can't be required in error handler: eval(<<<'PHP' namespace MyNamespace { abstract class AbstractFoo { abstract public static function foo(); // PHP 5.3 issues an E_STRICT here about abstract + static, even though it now supports static inheritance. } } PHP );

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.3.70.0120.00916.63
8.3.60.0110.00718.18
8.3.50.0120.00922.05
8.3.40.0120.00318.69
8.3.30.0090.00618.75
8.3.20.0040.00419.15
8.3.10.0080.00021.89
8.3.00.0040.00418.96
8.2.180.0030.01018.16
8.2.170.0080.00622.96
8.2.160.0090.00622.14
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00517.91
8.2.120.0060.00326.35
8.2.110.0060.00321.18
8.2.100.0060.00617.72
8.2.90.0040.00419.11
8.2.80.0030.00517.97
8.2.70.0090.00017.63
8.2.60.0080.00017.80
8.2.50.0000.00818.09
8.2.40.0060.00322.32
8.2.30.0000.00719.46
8.2.20.0030.00517.71
8.2.10.0040.00418.18
8.2.00.0000.00718.06
8.1.280.0070.01125.92
8.1.270.0050.00323.82
8.1.260.0030.00628.09
8.1.250.0060.00328.09
8.1.240.0090.00019.45
8.1.230.0040.00820.91
8.1.220.0080.00017.74
8.1.210.0040.00420.56
8.1.200.0000.00917.35
8.1.190.0050.00317.13
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0040.00420.68
8.1.150.0030.00518.81
8.1.140.0040.00419.53
8.1.130.0000.00717.70
8.1.120.0000.00717.32
8.1.110.0040.00417.41
8.1.100.0000.00717.46
8.1.90.0050.00217.32
8.1.80.0040.00417.33
8.1.70.0070.00017.30
8.1.60.0050.00317.43
8.1.50.0040.00417.45
8.1.40.0030.00517.41
8.1.30.0030.00517.49
8.1.20.0050.00217.66
8.1.10.0040.00417.52
8.1.00.0040.00417.42
8.0.300.0070.00020.03
8.0.290.0040.00416.75
8.0.280.0000.00718.48
8.0.270.0000.00717.29
8.0.260.0030.00317.32
8.0.250.0000.00717.00
8.0.240.0000.00717.02
8.0.230.0040.00417.03
8.0.220.0030.00516.93
8.0.210.0000.00717.01
8.0.200.0000.00717.08
8.0.190.0000.00816.95
8.0.180.0040.00417.01
8.0.170.0000.00816.93
8.0.160.0040.00416.87
8.0.150.0030.00316.84
8.0.140.0070.00316.84
8.0.130.0030.00313.34
8.0.120.0040.00416.95
8.0.110.0040.00416.95
8.0.100.0040.00417.04
8.0.90.0070.00017.00
8.0.80.0070.00716.96
8.0.70.0070.00016.92
8.0.60.0040.00416.96
8.0.50.0000.00816.88
8.0.30.0080.01117.12
8.0.20.0150.00517.40
8.0.10.0080.00017.11
8.0.00.0040.01416.80
7.4.330.0050.00015.08
7.4.320.0030.00316.65
7.4.300.0000.00716.53
7.4.290.0040.00416.63
7.4.280.0040.00416.41
7.4.270.0030.00316.48
7.4.260.0110.00016.50
7.4.250.0030.00316.52
7.4.240.0040.00416.53
7.4.230.0030.00316.60
7.4.220.0060.00916.60
7.4.210.0110.00416.47
7.4.200.0070.00016.34
7.4.160.0090.00616.29
7.4.150.0120.00617.40
7.4.140.0070.01017.86
7.4.130.0070.01216.45
7.4.120.0080.00916.31
7.4.110.0110.00616.30
7.4.100.0090.00916.58
7.4.90.0080.00816.38
7.4.80.0110.00919.39
7.4.70.0120.02016.54
7.4.60.0100.00616.56
7.4.50.0060.00916.30
7.4.40.0130.01016.75
7.4.30.0160.00016.50
7.4.00.0100.00314.90
7.3.330.0030.00313.28
7.3.320.0060.00013.24
7.3.310.0070.00016.28
7.3.300.0050.00216.27
7.3.290.0090.00816.27
7.3.280.0100.00716.25
7.3.270.0130.00317.40
7.3.260.0080.01016.26
7.3.250.0110.00816.38
7.3.240.0100.00816.38
7.3.230.0120.00616.43
7.3.210.0070.01016.30
7.3.200.0340.00516.42
7.3.190.0050.01116.20
7.3.180.0090.00616.27
7.3.170.0030.01416.31
7.3.160.0110.00716.40
7.2.330.0110.00716.61
7.2.320.0040.01216.48
7.2.310.0040.01216.68
7.2.300.0080.00816.36
7.2.290.0030.01316.41
7.2.60.0120.00016.65
7.2.00.0030.00919.09
7.1.200.0090.00315.69
7.1.100.0030.00818.18
7.1.70.0000.01716.65
7.1.60.0140.01019.85
7.1.50.0140.01016.89
7.1.00.0000.08022.54
7.0.200.0090.00914.73
7.0.60.0130.05720.00
7.0.50.0230.05720.34
7.0.40.0200.05320.47
7.0.30.0100.07020.32
7.0.20.0100.06720.45
7.0.10.0300.04720.29
7.0.00.0300.04720.23
5.6.210.0230.04320.53
5.6.200.0200.05721.27
5.6.190.0100.06321.18
5.6.180.0070.07021.17
5.6.170.0130.06021.21
5.6.160.0130.06321.05
5.6.150.0230.05720.96
5.6.140.0130.06021.06
5.6.130.0200.06321.16
5.6.120.0100.06321.05
5.6.110.0070.06721.04
5.6.100.0330.04021.05
5.6.90.0200.05721.04
5.6.80.0230.05020.61
5.6.70.0230.05020.42
5.6.60.0330.04320.41
5.6.50.0170.07320.46
5.6.40.0170.05320.48
5.6.30.0130.06320.44
5.6.20.0170.05320.32
5.6.10.0200.05320.39
5.6.00.0100.06020.39
5.5.350.0230.05320.53
5.5.340.0170.06720.72
5.5.330.0200.05020.83
5.5.320.0100.06721.01
5.5.310.0200.05720.85
5.5.300.0170.05720.88
5.5.290.0230.05320.85
5.5.280.0170.05320.87
5.5.270.0230.05020.95
5.5.260.0270.05020.95
5.5.250.0230.06020.82
5.5.240.0100.06020.26
5.5.230.0100.06320.41
5.5.220.0230.05020.41
5.5.210.0170.06320.21
5.5.200.0200.04720.36
5.5.190.0200.05020.38
5.5.180.0230.05320.10
5.5.160.0170.05720.20
5.5.150.0130.05720.40
5.5.140.0200.04720.21
5.5.130.0170.05320.35
5.5.120.0230.04720.39
5.5.110.0070.06320.19
5.5.100.0130.05720.09
5.5.90.0230.04320.18
5.5.80.0300.04320.11
5.5.70.0230.06020.19
5.5.60.0170.04720.10
5.5.50.0130.05720.10
5.5.40.0170.04720.15
5.5.30.0100.05720.02
5.5.20.0170.05720.11
5.5.10.0130.05720.09
5.5.00.0170.05319.98

preferences:
50.13 ms | 401 KiB | 5 Q