Re: [PHP] declaring a class as stdClass?

2006-06-15 Thread Richard Lynch
On Wed, June 14, 2006 1:08 pm, Mariano Guadagnini wrote: I hace an existencial doubt: i've seem many scripts declaring classes as stdClass. In the documentation (for PHP5 and also for 4), it says that this class is internal of php, and should't be used. By the manner I saw it's being used, i

Re: [PHP] declaring a class as stdClass?

2006-06-15 Thread Richard Lynch
On Wed, June 14, 2006 1:26 pm, D. Dante Lorenso wrote: Mariano Guadagnini wrote: Hi list, I hace an existencial doubt: i've seem many scripts declaring classes as stdClass. In the documentation (for PHP5 and also for 4), it says that this class is internal of php, and should't be used. By

[PHP] declaring a class as stdClass?

2006-06-14 Thread Mariano Guadagnini
Hi list, I hace an existencial doubt: i've seem many scripts declaring classes as stdClass. In the documentation (for PHP5 and also for 4), it says that this class is internal of php, and should't be used. By the manner I saw it's being used, i guess that it can be handy to create a 'generic'

Re: [PHP] declaring a class as stdClass?

2006-06-14 Thread D. Dante Lorenso
Mariano Guadagnini wrote: Hi list, I hace an existencial doubt: i've seem many scripts declaring classes as stdClass. In the documentation (for PHP5 and also for 4), it says that this class is internal of php, and should't be used. By the manner I saw it's being used, i guess that it can be

Re: [PHP] declaring a class as stdClass?

2006-06-14 Thread Larry Garfield
To answer both of you: $var = new stdClass(); is perfectly acceptable. I do it all the time. The caveat is that the behavior is slightly different in PHP 4 than PHP 5. In PHP 4, $var would behave exactly like an associative array, just with different funky characters to access its