mirror of
https://github.com/php/php-src.git
synced 2024-12-13 03:44:17 +08:00
1b565f1393
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings" [https://wiki.php.net/rfc/deprecate-bareword-strings]
29 lines
801 B
PHP
29 lines
801 B
PHP
--TEST--
|
|
076: Unknown constants in namespace
|
|
--FILE--
|
|
<?php
|
|
namespace foo;
|
|
|
|
$a = array(unknown => unknown);
|
|
|
|
echo unknown;
|
|
echo "\n";
|
|
var_dump($a);
|
|
echo \unknown;
|
|
--EXPECTF--
|
|
Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d
|
|
|
|
Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d
|
|
|
|
Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d
|
|
unknown
|
|
array(1) {
|
|
["unknown"]=>
|
|
%s(7) "unknown"
|
|
}
|
|
|
|
Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_076.php:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %sns_076.php on line %d
|