📄 bug32647.phpt
字号:
--TEST--Bug #32647 (Using register_shutdown_function() with invalid callback can crash PHP)--INI--error_reporting=4095display_errors=1--FILE--<?phpfunction foo(){ echo "foo!\n";}class bar{ function barfoo () { echo "bar!\n"; }}unset($obj);register_shutdown_function(array($obj,"")); // Invalidregister_shutdown_function(array($obj,"some string")); // Invalidregister_shutdown_function(array(0,"")); // Invalidregister_shutdown_function(array('bar','foo')); // Invalidregister_shutdown_function(array(0,"some string")); // Invalidregister_shutdown_function('bar'); // Invalidregister_shutdown_function('foo'); // Validregister_shutdown_function(array('bar','barfoo')); // Invalid$obj = new bar;register_shutdown_function(array($obj,'foobar')); // Invalidregister_shutdown_function(array($obj,'barfoo')); // Valid?>--EXPECTF--Notice: Undefined variable: obj in %s on line %dWarning: register_shutdown_function(): Invalid shutdown callback 'Array' passed in %s on line %dNotice: Undefined variable: obj in %s on line %dWarning: register_shutdown_function(): Invalid shutdown callback 'Array' passed in %s on line %dWarning: register_shutdown_function(): Invalid shutdown callback 'Array' passed in %s on line %dWarning: register_shutdown_function(): Invalid shutdown callback 'Array' passed in %s on line %dStrict Standards: Non-static method bar::barfoo() cannot be called statically in %sbug32647.php on line %dWarning: register_shutdown_function(): Invalid shutdown callback 'bar::foobar' passed in %sbug32647.php on line %dfoo!Strict Standards: Non-static method bar::barfoo() cannot be called statically in Unknown on line 0Strict Standards: Non-static method bar::barfoo() cannot be called statically in Unknown on line 0bar!bar!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -