I\'m using the following script to use a database using PHP:
try{ $db = new PDO(\'mysql:host=\'.$host.\';port=\'.$port.\';dbname=\'.$db, $user, $pass, $o
In PHP7, we now can using try catch fatal error with simple work
try { do some thing evil } catch (Error $e) { echo 'Now you can catch me!'; }
But usualy, we should avoid using catch Error, because it involve to miss code which is belong to programmer's reponsibility :-)