no_global_fallback2.phpt 343 B

123456789101112131415161718192021
  1. --TEST--
  2. non-existent imported functions should not be looked up in the global table
  3. --FILE--
  4. <?php
  5. namespace {
  6. function test() {
  7. echo "NO!";
  8. }
  9. }
  10. namespace foo {
  11. use function bar\test;
  12. test();
  13. }
  14. ?>
  15. --EXPECTF--
  16. Fatal error: Uncaught Error: Call to undefined function bar\test() in %s:%d
  17. Stack trace:
  18. #0 {main}
  19. thrown in %s on line %d