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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2018 The PHP Group
All rights reserved.
Last updated: Sun Sep 23 21:01:25 2018 UTC