?? bug32647.phpt
字號(hào):
--TEST--Bug #32647 (Using register_shutdown_function() with invalid callback can crash PHP)--INI--error_reporting=2047display_errors=1--FILE--<?phpfunction foo(){ echo "joo!\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'); // Validregister_shutdown_function('foo'); // Validregister_shutdown_function(array('bar','barfoo')); // Valid$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() [/phpmanual/function.register-shutdown-function.html]: Invalid shutdown callback 'Array' passed in %s on line %dNotice: Undefined variable: obj in %s on line %dWarning: register_shutdown_function() [/phpmanual/function.register-shutdown-function.html]: Invalid shutdown callback 'Array' passed in %s on line %dWarning: register_shutdown_function() [/phpmanual/function.register-shutdown-function.html]: Invalid shutdown callback 'Array' passed in %s on line %dWarning: register_shutdown_function() [/phpmanual/function.register-shutdown-function.html]: Invalid shutdown callback 'Array' passed in %s on line %dWarning: (Registered shutdown functions) Unable to call bar::foo() - function does not exist in Unknown on line 0Warning: (Registered shutdown functions) Unable to call bar() - function does not exist in Unknown on line 0joo!bar!Warning: (Registered shutdown functions) Unable to call bar::foobar() - function does not exist in Unknown on line 0bar!
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -