FANDOM


The title of this article should be die(), but due to technical restrictions, cannot contain parenthesis.

Equivalent to exit().

This function is a language construct.

Arguments Edit

void die ({{{params}}})


void die ({{{params}}})


Argument Inclusion Edit

(PHP 3, PHP 4, PHP 5)

Examples Edit

Example 1: Edit

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

Output Edit

Cannot open file sample_file

Example 2: Edit

 <?php
 die('Output this sample error message.');
 ?>

Output Edit

Output this sample error message.
For more details on this function, visit its entry in the php manual.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.