note 113444 added to function.boolval
| From: | TomaszModzelewski | Date: | Fri, 11 Oct 2013 15:13:43 +0000 |
| Subject: | note 113444 added to function.boolval | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196526@lists.php.net to get a copy of this message | ||
When someone is working on large projects, this feature can be useful boolval. In simple scripts, it
is best to cast to a boolean.
<?php
echo boolval(2); #1
?>
Will see the same thing:
<?php
echo (bool)2; #1
?>
----
Server IP: 69.147.83.199
Probable Submitter: 83.24.4.55
----
Manual Page -- http://php.net/manual/en/function.boolval.php
Edit -- https://master.php.net/note/edit/113444
Del: integrated -- https://master.php.net/note/delete/113444/integrated
Del: useless -- https://master.php.net/note/delete/113444/useless
Del: bad code -- https://master.php.net/note/delete/113444/bad+code
Del: spam -- https://master.php.net/note/delete/113444/spam
Del: non-english -- https://master.php.net/note/delete/113444/non-english
Del: in docs -- https://master.php.net/note/delete/113444/in+docs
Del: other reasons-- https://master.php.net/note/delete/113444
Reject -- https://master.php.net/note/reject/113444
Search -- https://master.php.net/manage/user-notes.php