Re: Constant Scope PHP5
| From: | Zeev Suraski | Date: | Sat, 23 Aug 2003 18:19:55 +0000 |
| Subject: | Re: Constant Scope PHP5 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4145@lists.php.net to get a copy of this message | ||
At 20:40 23/08/2003, l0t3k wrote:
Zeev, speaking of const, i have a feature request. why not accept "const" in the global context and create a compile-time global constant ? e.g.It's going to be runtime either way, because you could do if (...) { const FOO = 1; } else {const FOO = 2 }. Not sure if we want it as syntactic sugar for define() or not. Zeevconst FOO = 1 ; const BAR = 2;class Barbara { const Barbara::BUSH = FOO; };i'd much prefer this as an alternative to the runtime define().