exit and echo php

PHP
//exit — Output a message and terminate the current script
<?php

$filename = '/path/to/data-file';
$file = fopen($filename, 'r')
    or exit("unable to open file ($filename)");

?>


Source

Also in PHP: