RE: [PHP-DEV] Type hints with null default values
| From: | Cristiano Duarte | Date: | Wed, 20 Oct 2004 00:29:54 +0000 |
| Subject: | RE: [PHP-DEV] Type hints with null default values | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13409@lists.php.net to get a copy of this message | ||
Robert Silva wrote:
> Ok, last email then I swear I'll drop the issue and let you big dogs
> decide on a solution :)
>
> You say you are opposed to allowing null for type hinted values. Yet then
> you say you would agree to optional type hinted params (which could only
> default to a null value), so as a result, you really aren't opposed to
> allowing null for type hinted values. And as such, using [MyClass] to
> define the class hint to allow null shouldn't be an issue for you. If you
> don't want to make the class hint null, then don't add the [] or whatever
> is decided upon, but the people that don't follow your particular OOP
> guidelines can use [] to make null an allowable value.
+1
Regards,
Cristiano Duarte