why the die() don't catch the fatal error?

26 Views Asked by At

here is my code (the database don't need password, but i intentionally added it to create the error)

<?php
$connection = mysqli_connect("localhost", "root", "null", "db") or die("Connection failed");
/*
if($connection = mysqli_connect("localhost","root","null","db")){
    print "Hello";
} else {
    print "Connection failed";
}
*/

?>

when the page load it show only error handle and don't execute the die function

0

There are 0 best solutions below