* Thus wrote Zeev Suraski ([EMAIL PROTECTED]):
> 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.
> >
> >const FOO = 1 ;
> >const BAR = 2;
> >
> >
Yes, there appears to be some inconsistency here. We'll look into it.
Zeev
At 21:14 23/08/2003, Brad Bulger wrote:
hmm. but you can reference class constants without class/self::
when creating futher constants ('const bla = foo << 1;')
and this works, too:
bla(4);
$x->bla(3);
?>
>> Output:
>> no
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.
const FOO = 1 ;
const BAR = 2;
class Barbara {
const Barbara::BUSH = FOO;
};
i'd much prefer
hmm. but you can reference class constants without class/self::
when creating futher constants ('const bla = foo << 1;')
and this works, too:
bla(4);
$x->bla(3);
?>
>> Output:
>> no it's not
>> yes it's bar
Zeev Suraski wrote:
At 14:35 22/08/2003, Arjen Brouwer wrote:
Should'nt this work? Curre
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 r
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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net
Wait a sec... When did const become a keyword? And since when can you
initialize variables from outside a constructor/function?
Sorry to bother..
--
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Zeev Suraski" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> At 14:35
At 14:35 22/08/2003, Arjen Brouwer wrote:
Should'nt this work? Currently it reports an error about a undefined constant.
Should be var $bar = Test::FOO (or self::FOO, even though it appears not to
work right now) - there's no implicit class/object dereference of any kind
in PHP.
Zeev
--
PHP In
Should'nt this work? Currently it reports an error about a undefined constant.
bar;
?>
Ciao,
Arjen