#18565 [Com]: Constants TRUE and FALSE undefined
| From: | phpsurf at ifrance dot com | Date: | Thu, 05 Sep 2002 19:52:29 +0000 |
| Subject: | #18565 [Com]: Constants TRUE and FALSE undefined | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18508@lists.php.net to get a copy of this message | ||
ID: 18565
Comment by: phpsurf@ifrance.com
Reported By: paulo@isnet.com.br
Status: Closed
Bug Type: Zend Engine 2 problem
Operating System: Windows
PHP Version: 4CVS-2002-07-25
New Comment:
This bug is still open !
When you try the following script with the last windows binaries from
http://snaps.php.net/win32/ze2
<?php
var_dump(True);
var_dump(TrUe);
var_dump(False);
var_dump(FaLse);
?>
Outputs:
string(4) "True"
string(4) "TrUe"
string(5) "False"
string(5) "FaLse"
Previous Comments:
------------------------------------------------------------------------
[2002-07-25 19:59:45] sniper@php.net
This simple script:
<?php
var_dump(True);
var_dump(TrUe);
var_dump(False);
var_dump(FaLse);
?>
Outputs:
bool(true)
bool(true)
bool(false)
bool(false)
With latest CVS HEAD of PHP + ZE2..so it's fixed (or was never broken
even..you should check for TYPE too by using !== instead of != )
------------------------------------------------------------------------
[2002-07-25 11:00:05] paulo@isnet.com.br
In PHP 4.3-DEV with Zend2, the constants True and False are undefined,
so if you do:
$x=0;
if ($x!=True) {
echo "It must be True then...";
}
It evaluates the expression as true, and you see no error unless you
increase the error reporting level.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18565&edit=1