ID: 12245
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Status: Assigned
Bug Type: Variables related
Operating System: Solaris
PHP Version: 4.0.6
Old Assigned To: 
Assigned To: jeroen
New Comment:

added missing 'Assign To:' info.


Previous Comments:
------------------------------------------------------------------------

[2001-08-08 19:12:05] [EMAIL PROTECTED]

KISS example:

var_dump(TRUE || TRUE) -> int(1)
var_dump(FALSE && FALSE) -> int(0)

Patch awaiting to be committed, will be fixed in 4.0.7



------------------------------------------------------------------------

[2001-07-19 05:56:38] [EMAIL PROTECTED]

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



------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=12245&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to