1--TEST--
2#[\Deprecated]: Error Handler is deprecated.
3--FILE--
4<?php
5
6#[\Deprecated]
7function my_error_handler(int $errno, string $errstr, ?string $errfile = null, ?int $errline = null) {
8	echo $errstr, PHP_EOL;
9};
10
11set_error_handler('my_error_handler');
12
13#[\Deprecated]
14function test() {
15}
16
17test();
18
19?>
20--EXPECTF--
21Deprecated: Function my_error_handler() is deprecated in %s on line %d
22Function test() is deprecated
23