php-src/Zend/tests/use_function/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

14 lines
267 B
PHP

--TEST--
non-existent imported functions should not be looked up in the global table
--FILE--
<?php
require 'includes/global_baz.php';
use function foo\bar\baz;
var_dump(baz());
?>
--EXPECTF--
Fatal error: Call to undefined function foo\bar\baz() in %s on line %d