Posted by Michael Fesser on 01/13/08 21:58
..oO(Peter Pei)
>buggy. inconsistent lang design
Wrong. It's not inconsistent, it's just not properly documented.
The behaviour is perfectly logical and quite useful if you know it:
public function foo(TBar $obj) {}
=> You must pass a TBar object.
public function foo(TBar $obj = NULL) {}
=> The parameter is optional, but if you pass something, it must be an
object of class TBar.
That's how I want it.
Micha
PS: Please learn to quote properly. Your posting alone taken out of
context is meaningless.
Navigation:
[Reply to this message]
|