what is die() in php

die() function used in php for prints a message and exits the current script.it same as exit() function.
example 
<?php
$con = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$con) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($con);
?>