We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7e455b commit b1196a3Copy full SHA for b1196a3
Zend/tests/autoloading/function/global_fallback003.phpt
@@ -0,0 +1,27 @@
1
+--TEST--
2
+Fallback to non-existent function triggers autoloading once in namespace, once in global.
3
+--FILE--
4
+<?php
5
+
6
+namespace {
7
+ function loader($name) {
8
+ echo "function loader called with $name\n";
9
+ }
10
11
+ autoload_register_function('loader');
12
+}
13
14
+namespace bar {
15
+ try {
16
+ non_existent_function();
17
18
+ catch (\Error $e) {
19
+ echo "Error correctly caught: " . $e->getMessage() . "\n";
20
21
22
23
+?>
24
+--EXPECT--
25
+function loader called with bar\non_existent_function
26
+function loader called with non_existent_function
27
+Error correctly caught: Call to undefined function bar\non_existent_function()
0 commit comments