Re: Constant Scope PHP5
| From: | l0t3k | Date: | Sat, 23 Aug 2003 17:40:57 +0000 |
| Subject: | Re: Constant Scope PHP5 | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4143@lists.php.net to get a copy of this message | ||
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.
const FOO = 1 ;
const BAR = 2;
class Barbara {
const Barbara::BUSH = FOO;
};
i'd much prefer this as an alternative to the runtime define().
l0t3k
"Zeev Suraski" <zeev@zend.com> wrote in message
news:5.1.0.14.2.20030823170950.05b14e30@localhost...
> At 07:03 23/08/2003, DvDmanDT wrote:
> >Wait a sec... When did const become a keyword?
>
> In PHP 5.0.
>
> >And since when can you
> >initialize variables from outside a constructor/function?
>
> Since PHP 3.0 :)
>
> Zeev
>