die

(unknown)

die --  Output a message and terminate the current script

Description

void die (string message)

This language construct outputs a message and terminates parsing of the script. It does not return anything.

Example 1. die example


<?php
$filename = '/path/to/data-file';
$file = fopen ($filename, 'r')
    or die("unable to open file ($filename)");
?>
      

See also exit().