Re: redefined constructor: old and new syntax
| From: | Andi Gutmans | Date: | Thu, 18 Mar 2004 07:10:42 +0000 |
| Subject: | Re: redefined constructor: old and new syntax | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8573@lists.php.net to get a copy of this message | ||
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?
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.551&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