#43762 [Opn->Bgs]: Boolean FALSE not handled correctly
| From: | johannes@php.net | Date: | Sun, 06 Jan 2008 12:20:06 +0000 |
| Subject: | #43762 [Opn->Bgs]: Boolean FALSE not handled correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121070@lists.php.net to get a copy of this message | ||
ID: 43762
Updated by: johannes@php.net
Reported By: scratch65535 at att dot net
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: v2ksp4
PHP Version: 5.2.5
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
false castet to string is "".
Previous Comments:
------------------------------------------------------------------------
[2008-01-06 03:13:56] scratch65535 at att dot net
Description:
------------
The constant isn't translated when alone. It's translated only when
part of an arithmetic expression, or when passed to intval().
This bug appears on two different boxes, both running w2ksp4. One box
is running 4.4.7 (the bug has persisted across upgrades since 4.2), the
other 5.2.5.
Reproduce code:
---------------
<?php
echo false ;
echo (false) ;
echo false+false ;
echo intval(false) ;
echo '"'.false.'"' ;
?>
Expected result:
----------------
0000"0"
Actual result:
--------------
00""
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43762&edit=1