Re: php5 class initialization

From: Date: Wed, 24 Mar 2004 09:00:04 +0000
Subject: Re: php5 class initialization
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-8740@lists.php.net to get a copy of this message
RL>> The example was something like: RL>> RL>> class foo { RL>> function foo() { RL>> legacy generic constructor code RL>> } RL>> function __construct() { RL>> php5-specific stuff RL>> $this->foo(); // chain to legacy constructor code RL>> } RL>> } RL>> RL>> A bit contrieved, but when this class runs under PHP5 it would run the RL>> additional PHP5-specific code and when it runs under PHP4 it wouldn't. What is "php5-specific stuff" here? If there are some PHP5-specific constructs, they won't just run under PHP4, so the class is unusable under PHP4 anyway, not? Could you give me real-life example of someone using this to do something? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109

« previous php.internals (#8740) next »