[PHP-DEV] Problems on PHP5 object instantiation

2007-01-18 Thread Jingcheng Zhang
Hi, I'm now trying OOP in PHP5, and enjoy it very much. However, as we know PHP5 does not allow compile-time instantiation, so when I try this script: ?php class C { static private $o = new stdClass(); } ? it ends up with a parse error, while in Java it works naturally. I wonder whether

Re: [PHP-DEV] Problems on PHP5 object instantiation

2007-01-18 Thread Antony Dovgal
On 01/18/2007 05:06 PM, Jingcheng Zhang wrote: Hi, I'm now trying OOP in PHP5, and enjoy it very much. However, as we know PHP5 does not allow compile-time instantiation, so when I try this script: ?php class C { static private $o = new stdClass(); } ? Class properties are initialized