summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/bug47857.phpt
blob: 8bf04a39aa5746432a0f30ddc52b1ceaca4732f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
Bug #47851 (is_callable throws fatal error)
--FILE--
<?php
class foo {
	function bar() {
		echo "ok\n";
	}
}
var_dump(is_callable(array('foo','bar')));
foo::bar();
var_dump(is_callable(array('Exception','getMessage')));
Exception::getMessage();
?>
--EXPECTF--
bool(true)

Deprecated: Non-static method foo::bar() should not be called statically in %sbug47857.php on line %d
ok
bool(false)

Fatal error: Uncaught Error: Non-static method Exception::getMessage() cannot be called statically in %sbug47857.php:%d
Stack trace:
#0 {main}
  thrown in %sbug47857.php on line %d