3v4l.org

run code in 300+ PHP versions simultaneously
<?php function error_handler($errno, $errstr, $errfile, $errline) { throw new ErrorException($errstr, $errno, $errno, $errfile, $errline); } set_error_handler('error_handler'); try { echo 5 / 0; } catch(ErrorException $error) { echo new ErrorExceptionHTMLDecorator($error); } /* WARNING Message: Division by zero Code: 2 Line: 71 File: C:\webroot\www\error.php */ class ErrorExceptionHTMLDecorator { protected $error; protected static $levels = array( E_ERROR => 'ERROR', E_WARNING => 'WARNING', E_PARSE => 'PARSING ERROR', E_NOTICE => 'NOTICE', E_CORE_ERROR => 'CORE ERROR', E_CORE_WARNING => 'CORE WARNING', E_COMPILE_ERROR => 'COMPILE ERROR', E_COMPILE_WARNING => 'COMPILE WARNING', E_USER_ERROR => 'USER ERROR', E_USER_WARNING => 'USER WARNING', E_USER_NOTICE => 'USER NOTICE', E_STRICT => 'STRICT NOTICE', E_RECOVERABLE_ERROR => 'RECOVERABLE ERROR' ); public function __construct(ErrorException $error) { $this->error = $error; } public function render() { $level = isset(self::$levels[$this->error->getSeverity()]) ? self::$levels[$this->error->getSeverity()] : 'Unknown Error'; return sprintf( ' <h4>%s</h4> <strong>Message:</strong> %s<br /> <strong>Code:</strong> %d<br /> <strong>Line:</strong> %s<br /> <strong>File:</strong> %s<br /> ----------------------------------<br /> ', $level, $this->error->getMessage(), $this->error->getCode(), $this->error->getLine(), $this->error->getFile() ); } public function __toString() { return strip_tags($this->render()); } }

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.60.0110.01118.31
8.3.50.0220.00522.04
8.3.40.0070.01018.80
8.3.30.0070.00719.10
8.3.20.0040.00420.33
8.3.10.0060.00323.51
8.3.00.0040.00420.80
8.2.180.0120.00616.38
8.2.170.0070.00722.96
8.2.160.0070.00720.38
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0110.00726.16
8.2.120.0000.00819.36
8.2.110.0100.00022.15
8.2.100.0040.00821.01
8.2.90.0040.00419.06
8.2.80.0060.00317.97
8.2.70.0030.00517.50
8.2.60.0060.00617.55
8.2.50.0000.01018.07
8.2.40.0050.00319.88
8.2.30.0000.00718.31
8.2.20.0050.00319.47
8.2.10.0040.00418.04
8.2.00.0040.00419.40
8.1.280.0120.00625.92
8.1.270.0050.00323.87
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00823.83
8.1.230.0030.00719.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0070.00317.23
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0050.00318.55
8.1.160.0000.00721.86
8.1.150.0000.00818.64
8.1.140.0000.00717.48
8.1.130.0030.00317.88
8.1.120.0000.00717.46
8.1.110.0000.00917.33
8.1.100.0050.00217.37
8.1.90.0000.00717.33
8.1.80.0000.00717.45
8.1.70.0000.00717.25
8.1.60.0000.00817.59
8.1.50.0000.00717.54
8.1.40.0040.00417.48
8.1.30.0040.00417.66
8.1.20.0020.00517.58
8.1.10.0050.00317.65
8.1.00.0000.00817.59
8.0.300.0050.00318.77
8.0.290.0000.00916.75
8.0.280.0040.00418.49
8.0.270.0000.00717.15
8.0.260.0070.00017.30
8.0.250.0070.00017.05
8.0.240.0000.00717.06
8.0.230.0030.00316.96
8.0.220.0000.00716.88
8.0.210.0000.00716.95
8.0.200.0000.00617.05
8.0.190.0040.00416.89
8.0.180.0080.00016.98
8.0.170.0000.00816.88
8.0.160.0040.00316.94
8.0.150.0000.00716.91
8.0.140.0040.00416.86
8.0.130.0030.00313.37
8.0.120.0000.00816.94
8.0.110.0000.00816.93
8.0.100.0040.00416.79
8.0.90.0040.00416.73
8.0.80.0060.01016.91
8.0.70.0000.00716.82
8.0.60.0000.00816.93
8.0.50.0050.00216.95
8.0.30.0110.00717.19
8.0.20.0050.01417.40
8.0.10.0040.00416.85
8.0.00.0120.00616.71
7.4.330.0020.00215.20
7.4.320.0030.00316.63
7.4.300.0000.00616.64
7.4.290.0030.00316.50
7.4.280.0040.00416.54
7.4.270.0000.00716.63
7.4.260.0000.00716.59
7.4.250.0040.00416.51
7.4.240.0040.00416.58
7.4.230.0040.00416.41
7.4.220.0100.00716.67
7.4.210.0100.00616.63
7.4.200.0040.00416.44
7.4.160.0120.00316.67
7.4.150.0120.00617.40
7.4.140.0090.01017.86
7.4.130.0130.00516.53
7.4.120.0060.01216.68
7.4.110.0030.01316.32
7.4.100.0180.00616.69
7.4.90.0180.00016.68
7.4.80.0150.00419.39
7.4.70.0030.01316.57
7.4.60.0060.00916.50
7.4.50.0000.00516.52
7.4.40.0030.01616.50
7.4.30.0060.01016.39
7.4.00.0000.01715.18
7.3.330.0000.00513.48
7.3.320.0020.00213.45
7.3.310.0020.00516.45
7.3.300.0070.00016.46
7.3.290.0060.00916.40
7.3.280.0080.01216.49
7.3.270.0150.00417.40
7.3.260.0040.01316.55
7.3.250.0130.00716.50
7.3.240.0060.01016.35
7.3.230.0100.00716.57
7.3.210.0060.01216.53
7.3.200.0070.01419.39
7.3.190.0110.00816.52
7.3.180.0130.00316.42
7.3.170.0110.01116.45
7.3.160.0110.01116.40
7.3.120.0070.00714.94
7.2.330.0070.01016.77
7.2.320.0090.01316.55
7.2.310.0080.00816.61
7.2.300.0000.01716.39
7.2.290.0150.00316.78
7.2.60.0040.01116.36
7.2.00.0030.01319.59
7.1.200.0030.01015.89
7.1.100.0100.01018.19
7.1.70.0000.00817.23
7.1.60.0100.01319.70
7.1.50.0070.00717.02
7.1.00.0070.07322.30
7.0.200.0030.00716.88
7.0.140.0030.06722.08
7.0.60.0030.09019.93
7.0.50.0100.05717.88
7.0.40.0130.08320.21
7.0.30.0270.06320.27
7.0.20.0230.07720.30
7.0.10.0070.05320.15
7.0.00.0130.06320.33
5.6.280.0030.07020.93
5.6.210.0130.08020.54
5.6.200.0070.05718.16
5.6.190.0030.07020.61
5.6.180.0300.05320.58
5.6.170.0270.04320.73
5.6.160.0130.06320.54
5.6.150.0100.07318.29
5.6.140.0130.07318.23
5.6.130.0000.04318.19
5.6.120.0130.08321.03
5.6.110.0330.07021.13
5.6.100.0070.04021.04
5.6.90.0070.04720.99
5.6.80.0070.07020.52
5.5.350.0030.04020.48
5.5.340.0030.08017.98
5.5.330.0070.08320.41
5.5.320.0300.04720.27
5.5.310.0270.07320.27
5.5.300.0130.07717.95
5.5.290.0030.06018.07
5.5.280.0070.07320.97
5.5.270.0130.07720.91
5.5.260.0130.03720.80
5.5.250.0100.03720.63
5.5.240.4170.04720.05
5.4.450.0200.05319.39
5.4.440.0330.04719.55
5.4.430.0270.07019.46
5.4.420.0300.06019.63
5.4.410.0230.07719.07
5.4.400.0330.05019.26
5.4.390.0330.06319.13
5.4.380.0130.05018.98
5.4.370.0230.04318.85
5.4.360.0330.06718.95
5.4.350.0200.04319.20
5.4.340.0200.05719.14
5.4.320.0270.05019.24
5.4.310.0170.06019.09
5.4.300.0200.07719.13
5.4.290.0200.06018.99
5.4.280.0170.04019.24
5.4.270.0300.05719.22
5.4.260.0200.04319.18
5.4.250.0200.03718.99
5.4.240.0170.05719.14
5.4.230.0170.03718.86
5.4.220.0230.05718.86
5.4.210.0230.06718.99
5.4.200.0230.03318.86
5.4.190.0270.07019.05
5.4.180.0300.06019.18
5.4.170.0330.06019.18
5.4.160.0370.04019.04
5.4.150.0170.04019.06
5.4.140.0270.06316.72
5.4.130.0200.06016.30
5.4.120.0230.06716.41
5.4.110.0230.07016.42
5.4.100.0230.07316.56
5.4.90.0300.06016.24
5.4.80.0130.07316.29
5.4.70.0230.06716.44
5.4.60.0200.03316.45
5.4.50.0300.06716.26
5.4.40.0170.03716.38
5.4.30.0170.06316.48
5.4.20.0270.03316.33
5.4.10.0130.04316.43
5.4.00.0230.04015.78
5.3.290.0300.06314.59
5.3.280.0170.04014.73
5.3.270.0200.08014.70
5.3.260.0230.05314.64
5.3.250.0170.06714.64
5.3.240.0270.06714.61
5.3.230.0170.04314.61
5.3.220.0230.06714.55
5.3.210.0270.06714.59
5.3.200.0300.05714.73
5.3.190.0200.04314.64
5.3.180.0270.06014.46
5.3.170.0230.04314.59
5.3.160.0230.07714.55
5.3.150.0170.06314.50
5.3.140.0270.04014.52
5.3.130.0200.04314.59
5.3.120.0230.04314.54
5.3.110.0230.06014.47
5.3.100.0170.04714.03
5.3.90.0270.06713.95
5.3.80.0230.03314.04
5.3.70.0230.05314.09
5.3.60.0270.03713.93
5.3.50.0230.07313.93
5.3.40.0270.07313.88
5.3.30.0300.04014.05
5.3.20.0230.03713.69
5.3.10.0270.02713.77
5.3.00.0170.06713.63
5.2.170.0130.05712.13
5.2.160.0230.05712.13
5.2.150.0230.04012.13
5.2.140.0170.05312.13
5.2.130.0130.03012.13
5.2.120.0130.03312.13
5.2.110.0130.03312.13
5.2.100.0200.05012.13
5.2.90.0200.05312.13
5.2.80.0170.05712.13
5.2.70.0130.03312.13
5.2.60.0100.03312.13
5.2.50.0200.05012.13
5.2.40.0100.02712.13
5.2.30.0130.06312.13
5.2.20.0170.03312.13
5.2.10.0170.05712.13
5.2.00.0130.04712.13
5.1.60.0200.05012.13
5.1.50.0130.04012.13
5.1.40.0130.05012.13
5.1.30.0070.04012.13
5.1.20.0070.02712.13
5.1.10.0200.04012.13
5.1.00.0130.02312.13
5.0.50.0100.03312.13
5.0.40.0100.03712.13
5.0.30.0070.06712.13
5.0.20.0100.03012.13
5.0.10.0100.03312.13
5.0.00.0100.06012.13
4.4.90.0130.02312.13
4.4.80.0070.03712.13
4.4.70.0030.03012.13
4.4.60.0070.01312.13
4.4.50.0030.03712.13
4.4.40.0030.03012.13
4.4.30.0100.02312.13
4.4.20.0200.01712.13
4.4.10.0070.01712.13
4.4.00.0030.02712.13
4.3.110.0070.02012.13
4.3.100.0070.02012.13
4.3.90.0100.03012.13
4.3.80.0130.04312.13
4.3.70.0100.02712.13
4.3.60.0070.02312.13
4.3.50.0030.03312.13
4.3.40.0100.02012.13
4.3.30.0000.01712.13
4.3.20.0030.01712.13
4.3.10.0070.01312.13
4.3.00.0030.01712.13

preferences:
45.56 ms | 401 KiB | 5 Q