是否可以覆盖已设置的register_shutdown_function堆栈?就像是:
function f1(){
echo "f1";
}
function f2(){
echo "f2";
}
register_shutdown_function("f1");
echo "actions here";
register_shutdown_function("f2");
call_to_undefined_function(); // to "produce" the error
Run Code Online (Sandbox Code Playgroud)
在这种情况下,我希望脚本只能调用f2().这可能吗?