mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

see https://wiki.php.net/rfc/deprecated_attribute Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com> Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
20 lines
352 B
PHP
20 lines
352 B
PHP
--TEST--
|
|
#[\Deprecated]: Code is E_USER_DEPRECATED for functions.
|
|
--FILE--
|
|
<?php
|
|
|
|
set_error_handler(function (int $errno, string $errstr, ?string $errfile = null, ?int $errline = null) {
|
|
var_dump($errno, E_USER_DEPRECATED, $errno === E_USER_DEPRECATED);
|
|
});
|
|
|
|
#[\Deprecated]
|
|
function test() {
|
|
}
|
|
|
|
test();
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(16384)
|
|
int(16384)
|
|
bool(true)
|