let's say i have this code:
$a = 3 //forgot semicolon
is there a way to prevent the script from crashing, detect the error, call a custom function that will record the php error inside a custom error log file instead of the default php error log in php.ini, and also record this in the database.
I have tried the set_error_handler function, and try and catch but these are not suitable for this kind of scenario.