3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($errno, $errstr, $errfile, $errline) { $namespace = 'ajf\ErrorExceptions\Dynamic'; $className = 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"; }

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.0090.00918.30
8.3.60.0150.00016.50
8.3.50.0110.00820.97
8.3.40.0090.00618.82
8.3.30.0040.01118.89
8.3.20.0070.00020.18
8.3.10.0060.00321.89
8.3.00.0040.00421.90
8.2.190.0100.00718.66
8.2.180.0040.01117.00
8.2.170.0120.00322.96
8.2.160.0140.00020.57
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00420.95
8.2.120.0080.00026.35
8.2.110.0030.00619.29
8.2.100.0080.00417.93
8.2.90.0000.00819.22
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0080.00018.04
8.2.50.0040.00418.09
8.2.40.0080.00022.21
8.2.30.0080.00019.36
8.2.20.0000.00817.76
8.2.10.0040.00418.13
8.2.00.0000.00917.94
8.1.280.0070.01125.92
8.1.270.0100.00722.10
8.1.260.0000.00928.09
8.1.250.0040.00428.09
8.1.240.0060.00322.23
8.1.230.0030.00717.71
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.36
8.1.190.0080.00017.36
8.1.180.0040.00418.10
8.1.170.0030.00518.51
8.1.160.0050.00220.79
8.1.150.0070.00020.71
8.1.140.0080.00019.58
8.1.130.0000.00817.78
8.1.120.0040.00417.38
8.1.110.0050.00317.48
8.1.100.0000.00817.46
8.1.90.0040.00417.45
8.1.80.0050.00317.51
8.1.70.0050.00217.47
8.1.60.0000.00717.59
8.1.50.0030.00517.36
8.1.40.0030.00517.43
8.1.30.0090.00017.68
8.1.20.0040.00417.71
8.1.10.0000.00817.61
8.1.00.0000.00817.57
8.0.300.0080.00018.84
8.0.290.0070.00016.63
8.0.280.0000.00718.36
8.0.270.0080.00017.07
8.0.260.0060.00017.19
8.0.250.0000.00716.98
8.0.240.0030.00516.97
8.0.230.0070.00016.97
8.0.220.0000.00816.92
8.0.210.0070.00016.80
8.0.200.0030.00316.88
8.0.190.0060.00317.03
8.0.180.0070.00016.86
8.0.170.0050.00216.89
8.0.160.0070.00316.98
8.0.150.0000.00716.80
8.0.140.0000.00816.95
8.0.130.0060.00013.34
8.0.120.0060.00316.88
8.0.110.0040.00416.90
8.0.100.0000.00716.80
8.0.90.0070.00017.00
8.0.80.0060.00916.90
8.0.70.0030.00516.95
8.0.60.0000.00816.84
8.0.50.0000.00716.83
8.0.30.0120.00617.03
8.0.20.0120.01017.40
8.0.10.0000.00716.94
8.0.00.0080.01116.83
7.4.330.0000.00516.69
7.4.320.0030.00316.56
7.4.300.0000.00716.60
7.4.290.0000.00616.50
7.4.280.0000.00816.65
7.4.270.0030.00316.60
7.4.260.0030.00316.55
7.4.250.0040.00416.57
7.4.240.0020.00516.52
7.4.230.0000.00716.46
7.4.220.0110.01016.64
7.4.210.0030.01216.67
7.4.200.0050.00216.46
7.4.160.0130.00616.46
7.4.150.0050.01317.40
7.4.140.0080.00717.86
7.4.130.0090.00816.53
7.4.120.0070.00916.62
7.4.110.0140.00416.51
7.4.100.0080.00916.57
7.4.90.0070.01116.57
7.4.80.0090.00819.39
7.4.70.0100.00616.48
7.4.60.0070.01116.52
7.4.50.0040.01116.47
7.4.40.0120.00916.47
7.4.30.0030.01416.63
7.4.00.0130.00314.94
7.3.330.0000.00713.41
7.3.320.0000.00713.30
7.3.310.0030.00316.29
7.3.300.0000.00716.44
7.3.290.0040.00416.48
7.3.280.0100.00816.41
7.3.270.0030.01317.40
7.3.260.0110.00716.30
7.3.250.0100.00616.42
7.3.240.0100.00716.63
7.3.230.0030.01516.63
7.3.210.0070.01016.43
7.3.200.0060.01019.39
7.3.190.0070.01316.50
7.3.180.0130.00316.38
7.3.170.0060.01216.36
7.3.160.0120.00316.48
7.2.330.0110.00716.94
7.2.320.0120.00616.82
7.2.310.0070.01116.41
7.2.300.0090.00916.70
7.2.290.0110.00516.42
7.2.60.0080.00417.06
7.2.50.0060.00616.76
7.2.00.0110.00719.25
7.1.200.0070.00715.72
7.1.100.0030.00718.29
7.1.70.0000.00917.21
7.1.60.0070.01419.40
7.1.50.0030.01916.98
7.1.00.0000.08022.25
7.0.200.0290.00714.39
7.0.60.0170.08321.77
7.0.50.0000.05017.89
7.0.40.0100.08020.06
7.0.30.0200.05020.13
7.0.20.0170.04720.10
7.0.10.0070.04020.06
7.0.00.0070.08320.22
5.6.280.0000.03321.12
5.6.210.0000.09020.55
5.6.200.0070.08318.27
5.6.190.0070.05020.54
5.6.180.0070.05020.46
5.6.170.0170.06020.51
5.6.160.0030.06020.45
5.6.150.0100.08018.18
5.6.140.0200.05018.19
5.6.130.0030.08318.27
5.6.120.0130.07721.04
5.6.110.0200.07321.04
5.6.100.0170.07320.96
5.6.90.0000.08720.86
5.6.80.0100.07320.38
5.5.350.0000.07720.44
5.5.340.0130.07017.99
5.5.330.0030.08720.31
5.5.320.0170.06720.28
5.5.310.0330.07320.36
5.5.300.0070.08018.00
5.5.290.0170.05718.02
5.5.280.0170.07720.80
5.5.270.0100.07720.87
5.5.260.0070.08720.77
5.5.250.0130.08020.66
5.5.240.0100.03720.26

preferences:
56.98 ms | 401 KiB | 5 Q