summaryrefslogtreecommitdiff
path: root/Zend/tests/incompat_ctx_user.phpt
blob: 8c7461e4f79e48b7c3476085033adf9364171d65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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--
Exception: Non-static method A::foo() cannot be called statically