Re: [PHP] PHP5 class constants

2005-10-29 Thread Richard Lynch
On Thu, October 27, 2005 9:56 pm, Chris wrote: > Though I suppose you could make an argument for using expressions that > consist of only constant values. Actually... One could argue that so long as the programmer was willing to accept the consequences, there could be many legitimate circumstance

Re: [PHP] PHP5 class constants

2005-10-27 Thread Chris
Dragan Stanojevic - Nevidljivi wrote: Jasper Bryant-Greene wrote: On Fri, 2005-10-28 at 01:02 +0200, Dragan Stanojevic - Nevidljivi wrote: [snip] and it works fine, I cannot define a constant by expression, like: class Foo { const AAA = 1 << 0; const BBB = 1 << 1; const CCC = 1 <

Re: [PHP] PHP5 class constants

2005-10-27 Thread Dragan Stanojevic - Nevidljivi
Jasper Bryant-Greene wrote: On Fri, 2005-10-28 at 01:02 +0200, Dragan Stanojevic - Nevidljivi wrote: [snip] and it works fine, I cannot define a constant by expression, like: class Foo { const AAA = 1 << 0; const BBB = 1 << 1; const CCC = 1 << 2; const DDD = 1 << 3; } Well now,

Re: [PHP] PHP5 class constants

2005-10-27 Thread Jasper Bryant-Greene
On Fri, 2005-10-28 at 01:02 +0200, Dragan Stanojevic - Nevidljivi wrote: [snip] > and it works fine, I cannot define a constant by expression, like: > > class Foo { > const AAA = 1 << 0; > const BBB = 1 << 1; > const CCC = 1 << 2; > const DDD =1 << 3; > } > > Well now, is this a b

[PHP] PHP5 class constants

2005-10-27 Thread Dragan Stanojevic - Nevidljivi
Hi guys, I think I've found a bug. I have a bunch of constants, and I'd like to present them as flags. While I can do class Foo { const AAA = 1; const BBB = 2; const CCC = 4; const DDD = 8; } and it works fine, I cannot define a constant by expression, like: class Foo { const

[PHP] PHP5 class constants

2003-08-09 Thread Cristiano Duarte
This code: results in this error: PHP Fatal error: Unsupported operand types in /test.php on line 13 Shouldn't class constants support simple expressions ? Cristiano Duarte -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php