PHP: die - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

eval defined

Last updated: Fri, 26 Jan 2007

view this page in

# die

(PHP 3, PHP 4, PHP 5)

die -- Equivalent to exit()

## Description

This language construct is equivalent to exit().

add a note User Contributed Notes
die
jbailey at raspberryginger dot com
20-Jan-2007 09:33
`die doesn't prevent destructors from being run, so the script doesn't exit immediately, it still goes through cleanup routines.`
28-Sep-2004 09:36
`Perhaps the Coldfusion query below can be answered as follows:
---------
(From the "User Contributed Notes" for the PHP construct "exit")
nospam at mydomain dot com
27-Sep-2004 10:12
Using return instead of exit is to prefer when you want the script that you have included inside another script to die but continue to execute the main script.
// Radcliff
---------`
matthias dot schniedermeyer at telefonica dot de
14-Oct-2003 07:29
`To get a perl-like die you can/should append this snipped
. " File: " . __FILE__ . " on line: " . __LINE__
e.g.
die ("Error" . " File: " . __FILE__ . " on line: " . __LINE__);`
add a note
eval defined

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST