3v4l.org

run code in 300+ PHP versions simultaneously
<?php function handleError($severity, $errstr, $errfile, $errline) { \error_clear_last(); if (!(\error_reporting() & $severity)) { return false; // Silenced } var_dump('ERROR!'); } set_error_handler('handleError'); // actual script @\gzuncompress('blub'); $error = \error_get_last(); var_dump($error);
Output for 7.3.0 - 7.3.29, 7.4.0 - 7.4.21, 8.0.0 - 8.0.8
array(4) { ["type"]=> int(2) ["message"]=> string(26) "gzuncompress(): data error" ["file"]=> string(9) "/in/voRep" ["line"]=> int(17) }

preferences:
162.27 ms | 536 KiB | 23 Q