|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-20 11:55 UTC] vrana@php.net
[2004-07-20 12:04 UTC] AxelLuttgens at swing dot be
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Mar 07 01:00:01 2026 UTC |
Description: ------------ The documentation for trigger_error() indicates: void trigger_error ( string error_msg [, int error_type]) But trigger_error() seems to return TRUE on my system. Now, I find it handy to have trigger_error() as a true function (as opposed to "language constructs", which often tend to make code more convoluted than needed). But does it always return TRUE? Or may it sometimes return FALSE? Or is it a bug in the code, the documentation then being correct? Reproduce code: --------------- # both print "1" on my system echo is_bool(trigger_error('a triggered one')); echo trigger_error('a triggered one') === TRUE; Expected result: ---------------- # According to the documentation, I would have expected # something like this: # this would print "" echo is_bool(trigger_error('a triggered one')); # this would print "1" echo is_null(trigger_error('a triggered one'));