On Wed, 24 Mar 2004, Stanislav Malyshev wrote: > RL>> > Why the said people won't just insert the PHP5-specific code right into > RL>> > the constructor? Why they need the second one? > RL>> > RL>> To avoid having it in 2 places. > > What is the second place? One plase is class() constructor, and the second > one?
The example was something like: class foo { function foo() { legacy generic constructor code } function __construct() { php5-specific stuff $this->foo(); // chain to legacy constructor code } } A bit contrieved, but when this class runs under PHP5 it would run the additional PHP5-specific code and when it runs under PHP4 it wouldn't. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php