php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18565 Constants TRUE and FALSE undefined
Submitted: 2002-07-25 11:00 UTC Modified: 2002-09-19 10:53 UTC
From: paulo at isnet dot com dot br Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4CVS-2002-07-25 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: paulo at isnet dot com dot br
New email:
PHP Version: OS:

 

 [2002-07-25 11:00 UTC] paulo at isnet dot com dot 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-25 19:59 UTC] 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-09-05 14:52 UTC] phpsurf at ifrance dot com
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"
 [2002-09-19 10:53 UTC] zeev@php.net
This bug is definitely fixed in CVS.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri May 22 17:00:01 2026 UTC