redefined constructor: old and new syntax
| From: | Lorenzo Alberton | Date: | Thu, 18 Mar 2004 00:28:00 +0000 |
| Subject: | redefined constructor: old and new syntax | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-8571@lists.php.net to get a copy of this message | ||
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