|
Posted by Michael Fesser on 07/25/07 18:13
..oO(Sanders Kaufman)
>Michael Fesser wrote:
>>
>> A constructor is not a normal method and should not be seen as that.
>> Do you know for sure what PHP does internally when calling it? I don't.
>
>Now THAT's an interesting point. But the PHP documentation seems to
>indicate that it treats it as any other public function.
PHP itself indicates that a constructor is a special method, simply
because it starts with two underscores. That's PHP's common notation for
its "magic" functions and methods.
In PHP 5 there's even some more magic for classes in the form of the
interceptor methods __get(), __set(), __call() and some more. Of course
you could call them by hand as well, because they're all public ...
Micha
Navigation:
[Reply to this message]
|