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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 01:01:28 2024 UTC