php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27286 Predefined constants behavior
Submitted: 2004-02-17 02:04 UTC Modified: 2004-02-17 03:51 UTC
From: yiwakiri at st dot rim dot or dot jp Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 4.3.4 OS: FreeBSD
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: yiwakiri at st dot rim dot or dot jp
New email:
PHP Version: OS:

 

 [2004-02-17 02:04 UTC] yiwakiri at st dot rim dot or dot jp
Description:
------------
Hi,

I think that behavior of the following scripts is a bug.


$ php -r "define('TRUE', false); var_dump(TRUE);" 
bool(false) 


To others FALSE/NULL is behaved similarly.
I want you to carry out a re-definition by the ability
not doing like the usual constant.

I checked folloing version.

PHP 5.0.0RC1-dev (cli) (built: Feb 5 2004 15:18:40) 
PHP 4.3.4 (cli) (built: Feb 3 2004 10:01:36) 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-17 03:51 UTC] sniper@php.net
Shortly: Don't do that. :)
Changing this would slow things down too much.
But if you want a) faster scripts b) be sure true/false are true/false always, use the lowercase true/false constants.
Only TRUE / FALSE can be redefined, true / false not.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jun 13 23:01:33 2025 UTC