Excerpts from troels knak-nielsen's message of Thu Jul 02 10:14:18 -0400 2009:
> I would have expected the second call to __construct() to yield an error.
Why should it? Especially since this is idiomatic code:
class A {
public function __construct($a) {
$this->a = $a;
}
}
class B extends A {
public function __construct($a, $b) {
$this->b = $b;
parent::__construct($a);
}
}
__construct doesn't do anything like allocate memory. It just happens
to get called when we do "new B(1, 2)"
Cheers,
Edward
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php