|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2000-08-17 15:40 UTC] hholzgra@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 01:00:01 2025 UTC | 
<? function test() { if(defined("SOME_CONSTANT")) print("YES: "); print(SOME_CONSTANT); } define("SOME_CONSTANT", "the value of the constant"); test(); ?> 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.