die( ) function is used to display a message and exit the script. It may be used to print alternate message . Instead of showing error it will show the user friendly message.
die( ) function is only used to print string messages .value of variables cannot print with die( ) function
<?php
die("this is Php die example");
//this will print the message
$x="hello test";
die($x)
//this will show blank screen.
?>