I use register_shutdown() to show the page if loading takes a lot of time, causing a PHP timeout. I really do not need to show a fatal error to the user, how to hide this message?
register_shutdown()
You would like to set the display_errors directive in your php.ini to your production machine. Alternatively, if your script does not have fatal errors outside the timeout, you can use ini_set to disable the display of errors at runtime.
display_errors
php.ini
ini_set
To hide the error message, you can use error_reporting(E_NONE) to suppress all error messages.
error_reporting(E_NONE)
Or you can just do ini_set('display_errors','0'); to hide error messages from displaying them and register them.
ini_set('display_errors','0');