On 20/01/11 23:25, Martin Scotta wrote:
and what what happen if the extending class does not call
parent::__construct() ?
__construct is just like any other function, but with semantic added on top
of.
Changing the way it behaves will cause many headaches
---
BTW, Did you noted that "self" keyword is allowed as method name? so I
belive it is not a keyword at all
class Foo{
function self() {
echo __METHOD__, PHP_EOL;
}
}
$foo = new Foo();
$foo->self();
'self' is not a keyword, but a special predefined class:
http://www.php.net/manual/en/reserved.classes.php
'parent' also works as a method name for the same reason.
'static' does not work, as it's a keyword.
Cheers,
David
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php