error_get_last

Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8
Get the last occurred error
<?php error_get_last(): ?array
<?php     {

        $this->terminate();



        if (is_array($error = error_get_last())) {

            if (! in_array($error['type'], [E_ERROR, E_CORE_ERROR], true)) {

                return;

            }