so I'm trying to prevent fatal errors from stopping my script from running
so I set error report to 0:
error_reporting(0);
then I added some junk code afterwards..
junk code~~~~trololololololol
However, PHP ends up returning parse error nonetheless:
Parse error: syntax error, unexpected 'require_once' (T_REQUIRE_ONCE) in etc
is there a way to prevent PHP from ceasing to execute when there are parse errors or is this a hopeless endeavor?
system('php -l filename')(info) but that's slow. Essentially, if a module is broken, you can catch it withregister_shutdown_functionand you should automatically disable it. It's like loading DLLs in a Windows program - if they segfault, the program as a whole is unpredictable and has to halt, but you can still take evasive action to stop it loading the same DLL the next time it loads.