RL>> There are a number of changes between PHP4 and PHP5 that aren't strictly
RL>> syntactical but rather behavioural so while the code itself will pass the
RL>> php4 syntax check, it would not run as intended and thus be PHP5 only.  

Hm. Do you have some example of such code? Except for object cloning 
issues which are application-wide and constructors won't help you there - 
is there some class code that should be constructed differently in PHP5 
but behave exactly the same in all other aspects?

RL>> It could also be that this isn't in the same class.  You might simply be
RL>> extending a legacy PHP4 class with code specific to PHP5 and you don't

But you _are_ changing it - actually, you are replacing the constructor.  
That isn't different from renaming the old constructor and calling it as a
function - except that this way doesn't require any obscure "magic"
involved and is immediately obvious for anyone looking at the code. 

RL>> want to change the legacy class.  I suppose I could write up a realworld
RL>> example of this, but I don't think it is that obtuse.

By "real world" I don't mean "you write up", I mean "someone really needs 
it". You are defining language practice now. I think it's a bad practice to 
have "magical" constructors to behave differently according to presence of 
some other code.
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.109

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to