3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); 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.0150.00618.56
8.3.50.0140.00623.00
8.3.40.0030.01218.98
8.3.30.0110.00418.70
8.3.20.0080.00020.38
8.3.10.0070.00023.67
8.3.00.0040.00419.19
8.2.180.0060.00918.41
8.2.170.0110.00722.96
8.2.160.0110.00419.20
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0000.00822.16
8.2.120.0070.00026.35
8.2.110.0180.00420.57
8.2.100.0110.00017.93
8.2.90.0050.00319.22
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0040.00418.05
8.2.50.0030.00618.10
8.2.40.0030.00620.45
8.2.30.0080.00019.39
8.2.20.0040.00417.79
8.2.10.0030.00517.97
8.2.00.0070.00018.04
8.1.280.0200.00025.92
8.1.270.0080.00023.70
8.1.260.0110.00328.09
8.1.250.0040.00428.09
8.1.240.0030.00723.97
8.1.230.0050.00519.29
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0060.00317.25
8.1.190.0030.00617.22
8.1.180.0060.00318.10
8.1.170.0030.00618.36
8.1.160.0070.00020.64
8.1.150.0040.00418.97
8.1.140.0030.00519.62
8.1.130.0040.00417.64
8.1.120.0000.00717.31
8.1.110.0070.00317.36
8.1.100.0040.00417.38
8.1.90.0050.00317.43
8.1.80.0000.00717.41
8.1.70.0080.00017.48
8.1.60.0000.00717.60
8.1.50.0030.00517.42
8.1.40.0060.00317.38
8.1.30.0060.00317.68
8.1.20.0000.00817.57
8.1.10.0040.00717.55
8.1.00.0110.00317.50
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.48
8.0.270.0050.00217.34
8.0.260.0000.00617.29
8.0.250.0000.00717.05
8.0.240.0040.00416.96
8.0.230.0040.00417.02
8.0.220.0040.00417.00
8.0.210.0070.00016.92
8.0.200.0030.00316.98
8.0.190.0070.00316.98
8.0.180.0000.00917.01
8.0.170.0080.00016.90
8.0.160.0070.00017.01
8.0.150.0000.00716.95
8.0.140.0000.00716.84
8.0.130.0000.00613.39
8.0.120.0040.00416.86
8.0.110.0040.00416.91
8.0.100.0000.00717.02
8.0.90.0070.00017.03
8.0.80.0150.00016.96
8.0.70.0000.00717.04
8.0.60.0050.00316.88
8.0.50.0050.00216.82
8.0.30.0130.00417.04
8.0.20.0090.01117.40
8.0.10.0000.00816.92
8.0.00.0070.01016.93
7.4.330.0030.00315.08
7.4.320.0030.00316.43
7.4.300.0000.00616.38
7.4.290.0070.00016.54
7.4.280.0040.00616.46
7.4.270.0070.00016.46
7.4.260.0020.00516.41
7.4.250.0030.00516.46
7.4.240.0040.00416.56
7.4.230.0030.00316.61
7.4.220.0070.01316.50
7.4.210.0090.00616.55
7.4.200.0000.00816.68
7.4.160.0080.00816.63
7.4.150.0030.01517.40
7.4.140.0100.01217.86
7.4.130.0110.00916.56
7.4.120.0080.01216.55
7.4.110.0090.00616.36
7.4.100.0120.01216.38
7.4.90.0100.00916.52
7.4.80.0130.00719.39
7.4.70.0090.00916.51
7.4.60.0030.01316.30
7.4.50.0070.00716.53
7.4.40.0090.00916.49
7.4.30.0060.01016.57
7.4.00.0110.00714.93
7.3.330.0030.00313.42
7.3.320.0000.00513.34
7.3.310.0030.00316.24
7.3.300.0050.00316.43
7.3.290.0090.00516.42
7.3.280.0100.01016.41
7.3.270.0040.01217.40
7.3.260.0100.00716.49
7.3.250.0090.00916.38
7.3.240.0080.01016.52
7.3.230.0160.00016.55
7.3.210.0060.01216.70
7.3.200.0130.00716.39
7.3.190.0130.00316.53
7.3.180.0060.01016.52
7.3.170.0150.00716.63
7.3.160.0060.01416.45
7.2.330.0080.01116.75
7.2.320.0120.00616.69
7.2.310.0060.01016.50
7.2.300.0090.00916.66
7.2.290.0120.00616.70
7.2.60.0060.00916.93
7.2.00.0040.01119.16
7.1.200.0060.00315.63
7.1.100.0090.00318.07
7.1.70.0000.00717.01
7.1.60.0000.01419.90
7.1.50.0130.00316.59
7.1.00.0070.07322.40
7.0.200.0100.01014.66
7.0.70.0630.07019.94
7.0.60.0370.05719.99
7.0.50.0300.06020.41
7.0.40.0230.05320.36
7.0.30.0300.04720.40
7.0.20.0400.05720.35
7.0.10.0330.06720.25
7.0.00.0170.05720.34
5.6.280.0070.07021.11
5.6.220.0500.08020.71
5.6.210.0400.05020.68
5.6.200.0300.06021.12
5.6.190.0430.08321.11
5.6.180.0170.05721.13
5.6.170.0170.06721.19
5.6.160.0230.05021.09
5.6.150.0230.05021.13
5.6.140.0270.06321.19
5.6.130.0270.05321.14
5.6.120.0230.05021.13
5.6.110.0200.05321.11
5.6.100.0200.05321.20
5.6.90.0170.05721.06
5.6.80.0100.05720.45
5.6.70.0100.06020.50
5.6.60.0270.06720.46
5.6.50.0100.06020.50
5.6.40.0230.04720.51
5.6.30.0200.05720.55
5.6.20.0330.05720.46
5.6.10.0270.05720.43
5.6.00.0230.07320.43
5.5.360.0330.06020.42
5.5.350.0300.06020.49
5.5.340.0430.07020.79
5.5.330.0330.05720.85
5.5.320.0130.06320.91
5.5.310.0200.06020.87
5.5.300.0170.06020.73
5.5.290.0270.05020.98
5.5.280.0270.05720.86
5.5.270.0130.06320.93
5.5.260.0130.06020.90
5.5.250.0130.05720.79
5.5.240.0270.04020.37
5.5.230.0100.06020.32
5.5.220.0230.05320.32
5.5.210.0270.06320.31
5.5.200.0170.05720.23
5.5.190.0230.07320.23
5.5.180.0170.05720.04
5.5.160.0230.07720.29
5.5.150.0100.06720.08
5.5.140.0300.06320.25
5.5.130.0230.07020.30
5.5.120.0170.05720.32
5.5.110.0330.04020.29
5.5.100.0230.05020.25
5.5.90.0130.06020.14
5.5.80.0230.05320.09
5.5.70.0170.06020.23
5.5.60.0200.05020.19
5.5.50.0130.06020.21
5.5.40.0170.05720.17
5.5.30.0130.05720.17
5.5.20.0200.05320.23
5.5.10.0230.05720.10
5.5.00.0170.05720.24

preferences:
32.17 ms | 401 KiB | 5 Q