<?php
declare(strict_types=1);
$c = new class {
public function error() {
trigger_error('hello');
}
};
set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline) {
var_dump('Error', $errno, $errstr, $errfile, $errline);
});
$c->error();
- Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- string(5) "Error"
int(1024)
string(5) "hello"
string(9) "/in/LjmEF"
int(7)
preferences:
182.14 ms | 403 KiB | 158 Q