Skip to content

Commit

Permalink
Autoloader fallback test should probably test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Danack authored and Girgias committed Dec 15, 2022
1 parent 2c1cdf1 commit 201640b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Zend/tests/autoloading/function/global_fallback002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@
Fallback to global function should not trigger autoloading.
--FILE--
<?php

namespace {
function loader($name) {
echo $name, \PHP_EOL;
echo "function loader called with $name\n";
}

autoload_register_function('loader');

function foo() {
echo "I am foo in global namespace.\n";
}
}

namespace bar {
var_dump('Hello');
foo();
}

?>
--EXPECT--
string(5) "Hello"
I am foo in global namespace.

0 comments on commit 201640b

Please sign in to comment.