Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8
Get the last occurred error
error_get_last(): ?array
        $stopped =& self::$stopped;

        
register_shutdown_function(function () use ($loop, &$hasRun, &$stopped) {


            
$error error_get_last();

            if ((isset(
$error['type']) ? $error['type'] : 0) & (E_ERROR E_CORE_ERROR E_COMPILE_ERROR E_USER_ERROR E_RECOVERABLE_ERROR)) {

                return;

            }