|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-08-08 19:12 UTC] jeroen@php.net
[2001-08-19 05:14 UTC] sniper@php.net
[2001-08-30 08:12 UTC] jeroen@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 04:00:01 2025 UTC |
The && operator (and ||) returns an integer value even when both arguments are boolean. Thus the following code: function is_true($val) { return (is_bool($val) && $val); } echo (is_true(true) ? 'T' : 'F'),"\n"; echo (is_true(is_true(true)) ? 'T' : 'F'),"\n"; gives T F -- Nick