__LINE__ != __LINE__?

php.internals

Jan Schneider

23 years ago
Current HEAD: die("line: " . __LINE__) works as expected, but die(__LINE__) doesn't output anything. Jan.
-- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

Edin Kadribasic

23 years ago
> Current HEAD: > > die("line: " . __LINE__) works as expected, but die(__LINE__)
doesn't output
> anything.
That's because die(int) will set exit status and not print anything. die(string) prints string and exits. Edin

Jan Schneider

23 years ago
Quoting Edin Kadribasic <edink@proventum.net>:
> > Current HEAD: > > > > die("line: " . __LINE__) works as expected, but die(__LINE__) > doesn't output > > anything. > > That's because die(int) will set exit status and not print anything. > die(string) prints string and exits.
Hm, that should perhaps be added to the manual. According to the user notes the same applies to exit. Jan.
-- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

Wez Furlong

23 years ago
exit === die --Wez. On Tue, 25 Mar 2003, Jan Schneider wrote:

Derick Rethans

23 years ago
On Tue, 25 Mar 2003, Jan Schneider wrote:
> Quoting Edin Kadribasic <edink@proventum.net>: > > > > Current HEAD: > > > > > > die("line: " . __LINE__) works as expected, but die(__LINE__) > > doesn't output > > > anything. > > > > That's because die(int) will set exit status and not print anything. > > die(string) prints string and exits. > > Hm, that should perhaps be added to the manual. According to the user notes > the same applies to exit.
File a documentation bug for this? Derick
-- "my other box is your windows PC" ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------