At 09:21 AM 3/18/2004 +0100, Lorenzo Alberton wrote:
On Thu, 18 Mar 2004 09:10:42 +0200, Andi Gutmans wrote: > Well it doesn't really make sense to redefine a constructor. We > added it on purpose. Do you want me to change it to E_STRICT?
if that is possible, yes, please. The example below should make it clear why redefinig a constructor *could* make sense.
Thanks Lorenzo
> At 01:28 AM 3/18/2004 +0100, Lorenzo Alberton wrote: >> Why has this one been committed? >> >> >> http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?login=2&r1=1.55 >> 1&r2=1.552 &ty=h >> >> >> It prevents constructors being redefined. >> That is fine, *except* for the following case: >> >> >> class MyClass >> { >> function MyClass() { >> //constructor for php4, >> //SHOULD be ignored by php5 >> } >> >> function __construct() { >> //constructor for php5, >> //ignored by php4 >> } >> } >> >> >> i.e. it doesn't allow a class to work on both php4 and php5. Or >> am I missing something obvious? >> >> Best regards, >> Lorenzo
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php