3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function (int $no, string $str): bool { var_dump('DEBUG: ' . $str); global $level; if ($level !== null) { error_reporting($level); // restore error level unset($level); return true; // handle the internal/helper error } // supress the current error output $level = error_reporting(); error_reporting(0); trigger_error('internal'); // trigger internal/helper error to restore the error level return false; // not handled to set the error_get_last() }); error_reporting(E_ALL); // to show the error, has no effect if the handler is called or not (expected, documented) var_dump(error_reporting()); trigger_error('custom'); // trigger_error('internal2'); // uncomment to reproduce the desired behaviour var_dump(error_get_last()['message']); var_dump(error_reporting());

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.120.0120.00720.63
8.4.110.0120.00622.52
8.4.100.0050.00417.96
8.4.90.0110.01018.64
8.4.80.0060.00517.95
8.4.70.0120.00817.80
8.4.60.0060.00418.99
8.4.50.0130.00618.52
8.4.40.0140.00017.82
8.4.30.0120.00318.70
8.4.20.0160.00319.65
8.4.10.0000.00919.76
8.3.250.0110.00818.92
8.3.240.0100.00817.32
8.3.230.0040.00516.71
8.3.220.0100.00817.31
8.3.210.0110.00916.62
8.3.200.0040.00416.72
8.3.190.0050.00417.25
8.3.180.0100.00518.46
8.3.170.0060.01218.68
8.3.160.0190.00318.13
8.3.150.0110.00718.53
8.3.140.0040.01416.89
8.3.130.0060.00316.63
8.3.120.0060.00319.14
8.3.110.0030.00620.94
8.3.100.0070.00718.72
8.3.90.0150.00026.77
8.3.80.0040.00417.97
8.3.70.0090.00618.43
8.3.60.0140.00718.55
8.3.50.0120.00616.57
8.3.40.0040.01420.08
8.3.30.0040.01121.79
8.3.20.0090.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00028.09
8.2.290.0080.00420.46
8.2.280.0110.00720.17
8.2.270.0070.01017.18
8.2.260.0060.00320.20
8.2.250.0060.00318.27
8.2.240.0040.00417.48
8.2.230.0030.00622.58
8.2.220.0120.00024.06
8.2.210.0030.00626.77
8.2.200.0040.00718.29
8.2.190.0150.00016.66
8.2.180.0120.00917.00
8.2.170.0030.01219.05
8.2.160.0080.00822.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0060.00328.09
8.2.120.0000.00828.09
8.1.330.0090.00921.88
8.1.320.0040.00416.28
8.1.310.0100.01016.80
8.1.300.0110.00420.11
8.1.290.0040.00730.84
8.1.280.0090.00925.92
8.1.270.0080.00020.66
8.1.260.0030.00628.09
8.1.250.0040.00428.09

preferences:
26.89 ms | 403 KiB | 5 Q