3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); set_error_handler( /** * @throws ErrorException */ static function ($errno, $errstr, $errfile, $errline): void { throw new ErrorException($errstr, $errno, $errno, $errfile, $errline); } ); try { @trigger_error('Oh no'); } catch (ErrorException $good) { assert('Oh no' === $good->getMessage(), get_class($good)); } finally { assert(isset($good), 'an expected exception was not thrown'); } unset($good); var_dump(error_get_last()); try { @trigger_error('Oh no'); } catch (ErrorException $good) { assert('Oh no' === $good->getMessage(), get_class($good)); } finally { assert(isset($good), 'an expected exception was not thrown'); } unset($good); assert(NULL === error_get_last()); try { set_error_handler(null); @trigger_error('Oh no'); restore_error_handler(); try { @trigger_error('Oh no'); } catch (ErrorException $good) { assert('Oh no' === $good->getMessage(), get_class($good)); } finally { assert(isset($good), 'an expected exception was not thrown'); } } catch (ErrorException $fail) { assert(false, sprintf('the "%s" exception must not be thrown', get_class($fail))); } finally { assert(!isset($fail), 'there must not have been any exception'); } var_dump(error_get_last());

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.4.140.0110.01117.93
8.4.130.0080.01318.16
8.4.120.0110.01020.57
8.4.110.0130.00518.98
8.4.100.0120.01018.03
8.4.90.0040.00518.18
8.4.80.0140.00618.13
8.4.70.0040.00418.04
8.4.60.0090.01218.54
8.4.50.0120.00817.98
8.4.40.0130.00619.67
8.4.30.0170.00320.35
8.4.20.0170.00318.83
8.4.10.0130.00619.54
8.3.270.0150.00816.92
8.3.260.0090.00416.87
8.3.250.0130.00520.86
8.3.240.0090.00616.61
8.3.230.0120.00716.86
8.3.220.0130.00618.44
8.3.210.0070.00116.66
8.3.200.0050.00416.73
8.3.190.0110.00416.86
8.3.180.0140.00616.60
8.3.170.0090.01018.87
8.3.160.0040.00416.66
8.3.150.0140.00020.63
8.3.140.0180.00016.85
8.3.130.0060.00318.54
8.3.120.0130.00620.86
8.3.110.0040.00420.94
8.3.100.0110.00724.06
8.3.90.0070.01026.77
8.3.80.0090.00016.75
8.3.70.0070.01318.68
8.3.60.0120.00318.30
8.3.50.0070.01616.31
8.3.40.0070.00718.71
8.3.30.0000.01518.57
8.3.20.0180.00024.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0060.00419.23
8.2.280.0150.00218.55
8.2.270.0140.00417.01
8.2.260.0040.01118.83
8.2.250.0040.00418.55
8.2.240.0090.00019.01
8.2.230.0030.00622.58
8.2.220.0040.00437.54
8.2.210.0070.01026.77
8.2.200.0060.00316.88
8.2.190.0070.00716.63
8.2.180.0070.01425.92
8.2.170.0060.00919.08
8.2.160.0070.00722.96
8.2.150.0050.00325.66
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0040.00421.05
8.2.110.0100.00020.52
8.2.100.0060.00617.84
8.2.90.0030.00520.60
8.2.80.0000.00818.05
8.2.70.0000.00817.93
8.2.60.0000.00818.06
8.2.50.0030.00618.10
8.2.40.0070.00320.89
8.2.30.0080.00019.27
8.2.20.0040.00417.91
8.2.10.0080.00019.34
8.2.00.0040.00419.34
8.1.330.0080.01116.48
8.1.320.0110.00816.41
8.1.310.0100.00018.61
8.1.300.0040.00418.20
8.1.290.0060.00330.84
8.1.280.0120.00625.92
8.1.270.0030.00623.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.01023.86
8.1.230.0030.00720.91
8.1.220.0040.00417.74
8.1.210.0030.00619.02
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0000.00918.10
8.1.170.0050.00318.67
8.1.160.0040.00718.05
8.1.150.0050.00218.98
8.1.140.0000.00718.95
8.1.130.0050.00220.29
8.1.120.0040.00417.49
8.1.110.0050.00217.43
8.1.100.0040.00717.45
8.1.90.0080.00017.38
8.1.80.0080.00017.35
8.1.70.0030.00617.52
8.1.60.0040.00417.52
8.1.50.0000.00817.53
8.1.40.0040.00417.62
8.1.30.0030.00617.70
8.1.20.0000.00817.61
8.1.10.0030.00617.55
8.1.00.0050.00317.45
8.0.300.0030.00620.08
8.0.290.0040.00416.63
8.0.280.0040.00418.49
8.0.270.0000.00816.99
8.0.260.0060.00018.66
8.0.250.0060.00317.02
8.0.240.0070.00017.06
8.0.230.0040.00417.11
8.0.220.0030.00417.02
8.0.210.0040.00416.86
8.0.200.0030.00317.09
8.0.190.0080.00017.13
8.0.180.0040.00416.92
8.0.170.0090.00317.00
8.0.160.0030.00516.97
8.0.150.0080.00016.88
8.0.140.0040.00416.96
8.0.130.0060.00013.46
8.0.120.0050.00216.84
8.0.110.0000.00816.99
8.0.100.0040.00417.02
8.0.90.0000.00717.03
8.0.80.0060.00916.96
8.0.70.0050.00216.79
8.0.60.0070.00016.98
8.0.50.0000.00716.79
8.0.30.0220.00817.01
8.0.20.0160.01316.88
8.0.10.0240.00616.98
8.0.00.0240.01017.06
7.4.330.0000.00415.55
7.4.320.0060.00016.53
7.4.300.0060.00016.64
7.4.290.0000.00716.45
7.4.280.0030.00516.52
7.4.270.0070.00016.68
7.4.260.0060.00013.21
7.4.250.0030.00316.52
7.4.240.0030.00316.54
7.4.230.0030.00516.70
7.4.220.0070.00016.61
7.4.210.0050.00916.61
7.4.200.0050.00216.44
7.4.160.0180.00916.59
7.4.150.0200.00916.61
7.4.140.0160.01516.38
7.4.130.0250.00616.52
7.4.120.0180.01416.54
7.4.110.0260.00916.45
7.4.100.0220.00616.38
7.4.90.0280.00616.31
7.4.80.0170.01016.36
7.4.70.0250.00316.38
7.4.60.0110.01616.36
7.4.50.0180.00916.35
7.4.40.0190.00816.16
7.4.30.0230.00416.38
7.4.20.0120.01316.47
7.4.10.0170.00916.35
7.4.00.0270.01216.48
7.3.330.0000.00816.29
7.3.320.0000.00513.40
7.3.310.0030.00616.52
7.3.300.0040.00416.37
7.3.290.0090.00616.43
7.3.280.0180.01516.36
7.3.270.0210.00616.31
7.3.260.0170.01016.27
7.3.250.0180.00916.37
7.3.240.0200.00816.38
7.3.230.0260.01116.29
7.3.220.0250.00816.32
7.3.210.0240.00816.35
7.3.200.0240.01416.27
7.3.190.0150.01916.25
7.3.180.0210.01216.33
7.3.170.0190.01116.29
7.3.160.0200.00716.36
7.3.150.0190.00816.30
7.3.140.0120.01516.23
7.3.130.0190.01416.36
7.3.120.0240.01116.32
7.3.110.0200.01016.24
7.3.100.0250.00316.27
7.3.90.0190.01216.57
7.3.80.0260.00416.32
7.3.70.0300.00716.38
7.3.60.0220.00416.41
7.3.50.0190.01416.43
7.3.40.0160.00816.43
7.3.30.0230.00816.46
7.3.20.0320.00716.41
7.3.10.0250.00816.44
7.3.00.0190.01516.40

preferences:
37.05 ms | 403 KiB | 5 Q