Re: [PHP] Constants in class definitions

2004-02-23 Thread Adam Bregenzer
On Tue, 2004-02-24 at 09:26, Toro Hill wrote: > Here's the situation: > PHP 4.3.4 > Apache 1.3.29 > MMCache 2.4.6 > > I'm ending up with some garbage in certain class variables. > The code runs fine without MMCache disabled. > There seems to be a very specific circumstances under which the error

Re: [PHP] Constants in class definitions

2004-02-23 Thread Toro Hill
Hi Adam. I was wondering if using defined constants in class definitions is completely legal (or even good practice) in PHP. I've looked throught the PHP documentation and from what I can tell it is legal. However, I've had some problems with Turck MMCache and class definitions that are similar to

Re: [PHP] Constants in class definitions

2004-02-23 Thread Adam Bregenzer
On Tue, 2004-02-24 at 08:22, Toro Hill wrote: > I've looked throught the PHP documentation and from what I can > tell it is legal. I'm using PHP4.3.4, and haven't had any problems with > class definitions like this. I use constants in classes myself without problems. In PHP 5 you can actually d

Re: [PHP] Constants in class definitions

2004-02-23 Thread Richard Davey
Hello Toro, Tuesday, February 24, 2004, 12:22:29 AM, you wrote: TH> Hi all. TH> I was wondering if using defined constants in class definitions TH> is completely legal (or even good practice) in PHP. I see absolutely no reason why not. Constants are just ways of defining non-changing variables,

[PHP] Constants in class definitions

2004-02-23 Thread Toro Hill
Hi all. I was wondering if using defined constants in class definitions is completely legal (or even good practice) in PHP. For example, define( "CONSTANT", "hello" ); class Yep{ $var stuff = array( CONSTANT => 'two' ); } ?> I've looked throught the PHP documentation and from what I can tell i