summaryrefslogtreecommitdiff
path: root/Zend/tests/incompat_ctx_user.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/incompat_ctx_user.phpt')
-rw-r--r--Zend/tests/incompat_ctx_user.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/Zend/tests/incompat_ctx_user.phpt b/Zend/tests/incompat_ctx_user.phpt
new file mode 100644
index 0000000000..2d9b59c1e8
--- /dev/null
+++ b/Zend/tests/incompat_ctx_user.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Incompatible context call (non-internal function)
+--INI--
+error_reporting=E_ALL
+--FILE--
+<?php
+
+class A {
+ function foo() { var_dump(get_class($this)); }
+}
+class B {
+ function bar() { A::foo(); }
+}
+$b = new B;
+$b->bar();
+
+?>
+--EXPECTF--
+Deprecated: Non-static method A::foo() should not be called statically, assuming $this from incompatible context in %s on line %d
+string(1) "B"