2006-09-15 09:12:17 +00:00
|
|
|
--TEST--
|
|
|
|
register_shutdown_function() & __call
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class test {
|
|
|
|
function _foo() {
|
|
|
|
throw new Exception('test');
|
|
|
|
}
|
|
|
|
function __call($name=null, $args=null) {
|
|
|
|
return test::_foo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-02 11:19:52 +00:00
|
|
|
try {
|
|
|
|
var_dump(register_shutdown_function(array("test","__call")));
|
2015-05-16 21:49:14 +00:00
|
|
|
} catch (Error $e) {
|
2015-04-02 11:19:52 +00:00
|
|
|
echo "\nException: " . $e->getMessage() . "\n";
|
|
|
|
}
|
2006-09-15 09:12:17 +00:00
|
|
|
|
|
|
|
echo "Done\n";
|
|
|
|
?>
|
2015-04-02 11:19:52 +00:00
|
|
|
--EXPECTF--
|
|
|
|
Exception: Non-static method test::__call() cannot be called statically
|
|
|
|
Done
|
|
|
|
|
2008-02-02 15:19:06 +00:00
|
|
|
Fatal error: Non-static method test::__call() cannot be called statically in %s on line %d
|