3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($errno, $errstr, $errfile, $errline) { $namespace = 'ajf\ErrorExceptions\Dynamic'; $className = preg_replace('/[^a-zA-Z0-9]/g', '', preg_replace('/\:.*$/g', '', implode('', explode(' ', ucwords($errstr))))); $fullClassName = $namespace . '\\' . $className; if (!class_exists($fullClassName)) { eval("namespace $namespace { class $className extends \ErrorException {} }"); } throw new $fullClassName($errstr, 0, $errno, $errfile, $errline); }); try { $foo = 1/0; } catch (ajf\ErrorExceptions\Dynamic\DivisionByZero $e) { echo "ba-da-bing, ba-da-boom: I caught a $e!\n"; } try { $repent = sin("123abc"); } catch (ajf\ErrorExceptions\Dynamic\ANonWellFormedNumericValueEncountered $e) { echo "praise be to zend_is_numeric_string_ex: $e"; } try { $empty = []; $void = $empty["soul"]; } catch (ajf\ErrorExceptions\Dynamic\UndefinedOffset $e) { echo "not even the colon can defeat me: $e"; }

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.0160.00016.88
8.3.50.0080.01021.20
8.3.40.0070.00718.79
8.3.30.0130.00318.80
8.3.20.0070.00020.33
8.3.10.0040.00423.65
8.3.00.0040.00421.88
8.2.180.0110.00416.63
8.2.170.0120.00322.96
8.2.160.0070.00719.46
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0060.00320.98
8.2.120.0040.00426.35
8.2.110.0030.00719.15
8.2.100.0080.00418.04
8.2.90.0030.00619.09
8.2.80.0050.00317.97
8.2.70.0060.00317.75
8.2.60.0030.00617.92
8.2.50.0040.00418.09
8.2.40.0040.00422.17
8.2.30.0000.00719.31
8.2.20.0000.00917.75
8.2.10.0000.00718.08
8.2.00.0030.00617.95
8.1.280.0030.01225.92
8.1.270.0110.00722.19
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0030.00622.21
8.1.230.0080.00417.77
8.1.220.0080.00017.77
8.1.210.0000.00818.77
8.1.200.0050.00517.36
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0050.00318.52
8.1.160.0000.00820.69
8.1.150.0040.00418.95
8.1.140.0040.00419.59
8.1.130.0030.00617.71
8.1.120.0040.00417.50
8.1.110.0050.00217.48
8.1.100.0040.00417.45
8.1.90.0000.00717.44
8.1.80.0000.00817.37
8.1.70.0000.00717.46
8.1.60.0080.00017.58
8.1.50.0090.00017.43
8.1.40.0050.00317.51
8.1.30.0000.00817.73
8.1.20.0060.00317.65
8.1.10.0030.00617.66
8.1.00.0070.00017.54
8.0.300.0040.00418.78
8.0.290.0030.00616.63
8.0.280.0040.00318.44
8.0.270.0030.00417.20
8.0.260.0030.00317.19
8.0.250.0030.00316.93
8.0.240.0030.00616.96
8.0.230.0030.00316.98
8.0.220.0040.00416.91
8.0.210.0050.00316.86
8.0.200.0060.00016.94
8.0.190.0000.00717.07
8.0.180.0000.00716.93
8.0.170.0030.00517.07
8.0.160.0080.00317.01
8.0.150.0050.00316.82
8.0.140.0000.00716.95
8.0.130.0000.00613.33
8.0.120.0080.00016.94
8.0.110.0040.00416.97
8.0.100.0040.00417.00
8.0.90.0060.00317.03
8.0.80.0110.00416.85
8.0.70.0030.00516.95
8.0.60.0050.00316.84
8.0.50.0000.00816.79
8.0.30.0040.01216.99
8.0.20.0120.00717.40
8.0.10.0040.00416.90
8.0.00.0100.00916.73
7.4.330.0000.00516.83
7.4.320.0000.00616.42
7.4.300.0050.00216.46
7.4.290.0070.00016.41
7.4.280.0090.00016.51
7.4.270.0000.00716.62
7.4.260.0000.00716.52
7.4.250.0000.00816.51
7.4.240.0030.00316.63
7.4.230.0030.00316.60
7.4.220.0110.01416.55
7.4.210.0090.00916.56
7.4.200.0000.00716.59
7.4.160.0090.00616.60
7.4.150.0110.00717.40
7.4.140.0110.00917.86
7.4.130.0110.00816.66
7.4.120.0100.00816.54
7.4.110.0090.00916.70
7.4.100.0040.01416.48
7.4.90.0080.01616.65
7.4.80.0060.01119.39
7.4.70.0080.00916.57
7.4.60.0130.00316.66
7.4.50.0030.01216.50
7.4.40.0120.00616.52
7.4.30.0110.00816.47
7.4.00.0040.01215.05
7.3.330.0000.00513.46
7.3.320.0020.00213.40
7.3.310.0000.00716.48
7.3.300.0000.00716.40
7.3.290.0000.00716.34
7.3.280.0090.00716.45
7.3.270.0140.00317.40
7.3.260.0150.00316.45
7.3.250.0100.00716.52
7.3.240.0120.00516.55
7.3.230.0120.00616.53
7.3.210.0060.01016.56
7.3.200.0030.01919.39
7.3.190.0110.00516.44
7.3.180.0100.00616.45
7.3.170.0070.01116.65
7.3.160.0030.01216.63
7.3.120.0030.01414.91
7.3.110.0120.00614.94
7.3.100.0030.01015.10
7.3.90.0080.00415.05
7.3.80.0030.01315.09
7.3.70.0030.00714.76
7.3.60.0030.01214.73
7.3.50.0100.00314.91
7.3.40.0060.00614.89
7.3.30.0100.00714.98
7.3.20.0030.00916.43
7.3.10.0050.00816.82
7.3.00.0050.01016.82
7.2.330.0150.00916.47
7.2.320.0110.01416.75
7.2.310.0000.01716.82
7.2.300.0100.00516.61
7.2.290.0070.01016.72
7.2.250.0030.01515.31
7.2.240.0040.01514.91
7.2.230.0030.01015.21
7.2.220.0040.00715.41
7.2.210.0030.00915.31
7.2.200.0030.01015.16
7.2.190.0060.00315.05
7.2.180.0040.00814.91
7.2.170.0040.00815.10
7.2.160.0100.00314.98
7.2.150.0080.00416.89
7.2.140.0080.00817.02
7.2.130.0030.01317.00
7.2.120.0070.00816.99
7.2.110.0070.00716.82
7.2.100.0090.00617.06
7.2.90.0030.01016.96
7.2.80.0020.00816.94
7.2.70.0080.00516.95
7.2.60.0040.01017.03
7.2.50.0040.00816.93
7.2.40.0060.00716.90
7.2.30.0040.00917.02
7.2.20.0090.00717.03
7.2.10.0050.01117.03
7.2.00.0040.01217.75
7.1.330.0070.00715.98
7.1.320.0080.00415.98
7.1.310.0070.00715.96
7.1.300.0000.01015.73
7.1.290.0070.00715.79
7.1.280.0030.00915.96
7.1.270.0040.00415.64
7.1.260.0110.00715.61
7.1.250.0030.00815.79
7.1.200.0100.00016.06
7.1.100.0030.01518.51
7.1.70.0060.00917.18
7.1.60.0090.01619.40
7.1.50.0030.01617.17
7.1.00.0000.08022.52
7.0.200.0340.00314.64
7.0.60.0170.07721.81
7.0.50.0070.04317.82
7.0.40.0070.09020.27
7.0.30.0370.04720.06
7.0.20.0370.07320.26
7.0.10.0000.04720.08
7.0.00.0100.06720.07
5.6.280.0000.03721.13
5.6.210.0030.06020.61
5.6.200.0030.09018.19
5.6.190.0100.08020.61
5.6.180.0330.06320.64
5.6.170.0370.07320.50
5.6.160.0100.04720.53
5.6.150.0070.05018.15
5.6.140.0070.07318.18
5.6.130.0070.06318.17
5.6.120.0130.08321.04
5.6.110.0100.07721.14
5.6.100.0030.09321.04
5.6.90.0100.08021.10
5.6.80.0100.07020.48
5.5.350.0100.08020.43
5.5.340.0030.04318.03
5.5.330.0100.07720.27
5.5.320.0600.07020.24
5.5.310.0330.04320.27
5.5.300.0000.04317.98
5.5.290.0100.08017.99
5.5.280.0100.07320.88
5.5.270.0070.05020.73
5.5.260.0100.07020.74
5.5.250.0300.04320.78
5.5.240.0130.02720.19

preferences:
53.93 ms | 401 KiB | 5 Q