summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/010.phpt
blob: 51132c6a15069980fc5b1c81a5fe56de9fa2be73 (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--
register_shutdown_function() & __call
--FILE--
<?php
class test {
        function _foo() {
                throw new Exception('test');
        }
        function __call($name=null, $args=null) {
                return test::_foo();
        }
}

try {
	var_dump(register_shutdown_function(array("test","__call")));
} catch (Error $e) {
	echo "\nException: " . $e->getMessage() . "\n";
}

echo "Done\n";
?>
--EXPECTF--
Exception: Non-static method test::__call() cannot be called statically
Done

Fatal error: Non-static method test::__call() cannot be called statically in %s on line %d