php-src/Zend/tests/use_const/no_global_fallback.phpt
Igor Wiedler 85d4cfb00d Disallow using functions/consts defined in the same file
* Keep track of defined function and const filenames
* Prohibit use function foo if function foo exists
* Prohibit use const foo if const foo exists
2013-08-25 00:02:46 +02:00

15 lines
278 B
PHP

--TEST--
non-existent imported constants should not be looked up in the global table
--FILE--
<?php
require 'includes/global_baz.php';
use const foo\bar\baz;
var_dump(baz);
?>
--EXPECTF--
Notice: Use of undefined constant baz - assumed 'baz' in %s on line %d
string(3) "baz"