3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($n, $message) { echo 'Error handler called: ' . $message . PHP_EOL; }); set_exception_handler(function ($e) { echo 'Exception handler called: ' . get_class($e) . ' - ' . $e->getMessage() . PHP_EOL; }); function strict(int $i) {} explode(['not', 'valid'], ['arguments']); try { explode(['not', 'valid'], ['arguments']); } catch (Throwable $e) { echo 'Caught exception: ' . get_class($e) . ' - ' . $e->getMessage() . PHP_EOL; } try { eval('eval is evil'); } catch (ParseError $e) { echo 'Caught exception: ' . get_class($e) . ' - ' . $e->getMessage() . PHP_EOL; } try { echo 1 / 0; } catch (DivisionByZeroError $e) { echo 'Caught exception: ' . get_class($e) . ' - ' . $e->getMessage() . PHP_EOL; } try { strict('one'); } catch (TypeError $e) { echo 'Caught exception: ' . get_class($e) . ' - ' . $e->getMessage() . PHP_EOL; }

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.0100.01018.31
8.3.50.0070.01222.85
8.3.40.0070.00718.84
8.3.30.0070.00718.63
8.3.20.0050.00220.28
8.3.10.0000.00723.71
8.3.00.0050.00319.08
8.2.180.0110.01118.13
8.2.170.0110.01122.96
8.2.160.0040.01119.04
8.2.150.0080.00024.18
8.2.140.0080.00324.66
8.2.130.0000.00826.16
8.2.120.0050.00321.12
8.2.110.0090.00021.09
8.2.100.0070.00717.80
8.2.90.0040.00418.98
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0080.00017.93
8.2.50.0040.00418.10
8.2.40.0040.00420.59
8.2.30.0000.00719.29
8.2.20.0040.00417.71
8.2.10.0060.00317.96
8.2.00.0040.00418.10
8.1.280.0060.01525.92
8.1.270.0030.00623.96
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0030.00721.25
8.1.230.0040.00717.70
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0080.00017.09
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0060.00318.50
8.1.160.0070.00019.06
8.1.150.0000.00718.78
8.1.140.0040.00419.55
8.1.130.0030.00317.60
8.1.120.0000.00717.36
8.1.110.0090.00017.32
8.1.100.0040.00417.34
8.1.90.0050.00217.34
8.1.80.0000.00717.41
8.1.70.0030.00317.47
8.1.60.0000.00717.61
8.1.50.0040.00417.39
8.1.40.0020.00517.41
8.1.30.0040.00417.46
8.1.20.0030.00617.65
8.1.10.0000.01117.52
8.1.00.0000.00917.47
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.47
8.0.270.0070.00017.29
8.0.260.0050.00317.34
8.0.250.0030.00316.93
8.0.240.0040.00417.00
8.0.230.0000.00717.06
8.0.220.0000.00716.98
8.0.210.0040.00416.98
8.0.200.0050.00217.00
8.0.190.0040.00816.94
8.0.180.0040.00416.99
8.0.170.0060.00316.89
8.0.160.0040.00416.95
8.0.150.0040.00416.86
8.0.140.0070.00016.98
8.0.130.0040.00313.41
8.0.120.0080.00016.92
8.0.110.0040.00416.97
8.0.100.0040.00417.03
8.0.90.0080.00017.05
8.0.80.0110.00817.05
8.0.70.0020.00516.84
8.0.60.0000.00816.94
8.0.50.0040.00417.01
8.0.30.0080.01117.21
8.0.20.0100.01217.40
8.0.10.0030.00517.04
8.0.00.0060.00916.64
7.4.330.0000.00515.28
7.4.320.0000.00616.53
7.4.300.0030.00316.59
7.4.290.0050.00216.62
7.4.280.0050.00516.64
7.4.270.0030.00316.64
7.4.260.0030.00316.52
7.4.250.0000.00816.61
7.4.240.0030.00316.63
7.4.230.0000.00716.35
7.4.220.0130.00716.54
7.4.210.0030.01116.58
7.4.200.0080.00016.75
7.4.160.0040.01216.59
7.4.150.0090.00917.40
7.4.140.0160.00817.86
7.4.130.0120.00716.55
7.4.120.0080.00916.65
7.4.110.0120.00616.54
7.4.100.0070.01716.81
7.4.90.0070.01016.55
7.4.80.0090.00919.39
7.4.70.0110.00416.44
7.4.60.0140.00416.55
7.4.50.0060.00916.51
7.4.40.0100.01016.54
7.4.30.0060.01016.55
7.4.00.0110.00414.87
7.3.330.0040.00313.20
7.3.320.0030.00313.32
7.3.310.0000.00716.45
7.3.300.0030.00616.50
7.3.290.0060.01016.43
7.3.280.0100.00716.49
7.3.270.0070.01017.40
7.3.260.0150.00316.54
7.3.250.0080.00916.60
7.3.240.0060.01116.60
7.3.230.0090.00916.48
7.3.210.0110.00616.38
7.3.200.0060.01116.49
7.3.190.0110.00516.48
7.3.180.0120.00916.47
7.3.170.0060.01316.63
7.3.160.0090.01216.51
7.2.330.0120.00816.76
7.2.320.0100.00616.82
7.2.310.0080.00816.36
7.2.300.0150.00316.86
7.2.290.0160.00316.70
7.2.60.0060.01016.94
7.2.00.0060.00619.74
7.1.200.0070.00715.86
7.1.100.0070.00718.08
7.1.70.0030.00617.04
7.1.60.0030.01019.90
7.1.50.0060.00616.87
7.1.00.0030.07722.31
7.0.200.0320.00314.76
7.0.80.0030.04319.94
7.0.70.0070.04719.99
7.0.60.0170.07319.81
7.0.50.0000.05020.41
7.0.40.0100.03720.14
7.0.30.0030.04320.08
7.0.20.0000.04720.13
7.0.10.0070.04020.12
7.0.00.0000.04719.94
5.6.280.0100.06721.14
5.6.230.0170.04020.61
5.6.220.0000.07720.66
5.6.210.0070.06720.70
5.6.200.0100.04721.04
5.6.190.0030.05321.05
5.6.180.0000.04721.03
5.6.170.0070.04321.09
5.6.160.0030.06321.07
5.6.150.0030.04321.09
5.6.140.0100.05321.03
5.6.130.0030.04321.09
5.6.120.0000.04721.05
5.6.110.0070.04321.12
5.6.100.0000.05021.00
5.6.90.0000.04021.10
5.6.80.0130.03320.51
5.6.70.0070.03720.52
5.6.60.0030.04020.55
5.6.50.0030.03320.57
5.6.40.0000.04320.32
5.6.30.0000.04320.39
5.6.20.0030.04320.44
5.6.10.0000.04320.32
5.6.00.0000.04320.52
5.5.370.0070.03720.46
5.5.360.0070.03320.42
5.5.350.0030.04320.43
5.5.340.0070.04720.82
5.5.330.0070.04020.89
5.5.320.0070.04720.95
5.5.310.0000.04720.87
5.5.300.0070.03720.94
5.5.290.0100.03320.81
5.5.280.0030.04320.63
5.5.270.0030.07020.73
5.5.260.0100.03020.78
5.5.250.0130.02720.66
5.5.240.0000.04320.18
5.5.230.0070.03320.21
5.5.220.0130.03020.29
5.5.210.0130.03020.22
5.5.200.0030.04020.20
5.5.190.0070.03020.21
5.5.180.0000.04320.13
5.5.160.0070.04320.24
5.5.150.0030.04020.11
5.5.140.0070.03720.25
5.5.130.0030.04320.09
5.5.120.0030.07720.23
5.5.110.0030.05320.19
5.5.100.0030.08720.04
5.5.90.0100.07320.08
5.5.80.0200.06320.11
5.5.70.0170.07020.16
5.5.60.0100.06320.04
5.5.50.0030.07720.12
5.5.40.0100.07720.13
5.5.30.0070.07320.00
5.5.20.0030.08319.94
5.5.10.0130.07719.99
5.5.00.0030.05020.05

preferences:
50.74 ms | 404 KiB | 6 Q