|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2653 Constants defined but not viewable
Submitted: 1999-11-02 19:36 UTC Modified: 2000-08-17 15:40 UTC
From: leon at clearink dot com Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.12 OS: Solaris
Private report: No CVE-ID: None
 [1999-11-02 19:36 UTC] leon at clearink dot com
	function test()
		if(defined("SOME_CONSTANT")) print("YES: ");

	define("SOME_CONSTANT", "the value of the constant");


This produces "YES: SOME_CONSTANT".  I know I may be using constants in an unintended way, but I'd like to set a constant value sometime after I've defined a function that uses it.  If this use is disallowed, I'm cool with that decision, but in that case, I'd like to see a parse error about an unrecognized token.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-17 15:40 UTC]
fixed in php4 (although still present in 3.0.16)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Dec 06 18:01:28 2023 UTC