mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
1b565f1393
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings" [https://wiki.php.net/rfc/deprecate-bareword-strings]
23 lines
539 B
PHP
23 lines
539 B
PHP
--TEST--
|
|
Bug #73163 (PHP hangs if error handler throws while accessing undef const in default value)
|
|
--FILE--
|
|
<?php
|
|
|
|
function doSomething(string $value = UNDEFINED) {
|
|
}
|
|
|
|
set_error_handler(function($errno, $errstr) {
|
|
throw new Exception($errstr);
|
|
});
|
|
|
|
doSomething();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' (this will throw an Error in a future version of PHP) in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): {closure}(%s)
|
|
#1 %s(%d): doSomething()
|
|
#2 {main}
|
|
thrown in %s on line %d
|