#21567 [Bgs]: die(__LINE__); gives no output

From: Date: Fri, 10 Jan 2003 14:46:09 +0000
Subject: #21567 [Bgs]: die(__LINE__); gives no output
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29681@lists.php.net to get a copy of this message
ID: 21567 Updated by: sander@php.net Reported By: chen@hivemail.com Status: Bogus Bug Type: *Programming Data Structures Operating System: Windows XP PHP Version: 4.2.3 New Comment: Not a bug. __LINE__ is an integer. If you give die() or exit() an integer, PHP will exit with that status. Using die((string) __LINE__) should work. Previous Comments: ------------------------------------------------------------------------ [2003-01-10 08:43:41] derick@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php die(number) will make PHP exit with exit code "number" and not show any message in this case. This is expected behavior and documented @ http://www.php.net/manual/en/function.exit.php Derick ------------------------------------------------------------------------ [2003-01-10 08:40:22] chen@hivemail.com Dying like this: die(__LINE__); Doesn't work, i.e the script dies without any output. Still, this works as expected: die(__FILE__); As does this: die('Gone to sleep at line: '.__LINE__); Chen ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21567&edit=1

« previous php.bugs (#29681) next »