summaryrefslogtreecommitdiff
path: root/Zend/tests/incompat_ctx_user.phpt
blob: 25c95ba21902081daab2d4ec04bfb84b2538ea97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Incompatible context call (non-internal function)
--FILE--
<?php

class A {
	    function foo() { var_dump(get_class($this)); }
}
class B {
	   function bar() { A::foo(); }
}
$b = new B;
try {
	$b->bar();
} catch (Throwable $e) {
	echo "Exception: " . $e->getMessage() . "\n";
}
?>
--EXPECTF--
Deprecated: Non-static method A::foo() should not be called statically in %s on line %d
Exception: Using $this when not in object context