summaryrefslogtreecommitdiff
path: root/Zend/tests/nested_method_and_function.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/nested_method_and_function.phpt')
-rw-r--r--Zend/tests/nested_method_and_function.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/Zend/tests/nested_method_and_function.phpt b/Zend/tests/nested_method_and_function.phpt
new file mode 100644
index 0000000000..46d55ddc52
--- /dev/null
+++ b/Zend/tests/nested_method_and_function.phpt
@@ -0,0 +1,29 @@
+--TEST--
+active_class_entry must be always correct (__METHOD__ should not depend on declaring function ce)
+--FILE--
+<?php
+
+namespace Baz;
+
+class Foo {
+ public static function bar() {
+ function foo() {
+ var_dump(__FUNCTION__);
+ var_dump(__METHOD__);
+ }
+
+ foo();
+
+ var_dump(__FUNCTION__);
+ var_dump(__METHOD__);
+ }
+}
+
+Foo::bar();
+
+?>
+--EXPECT--
+string(7) "Baz\foo"
+string(7) "Baz\foo"
+string(3) "bar"
+string(12) "Baz\Foo::bar"