RE: [PHP-DEV] [RFC] Type hints
| From: | Wez Furlong | Date: | Sun, 09 May 2004 10:45:11 +0000 |
| Subject: | RE: [PHP-DEV] [RFC] Type hints | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9746@lists.php.net to get a copy of this message | ||
In the class case it doesn't make sense, but for other types it does.
--Wez.
> AG>>sure if this is the perfect solution:
> AG>>nullable MyClass $a = 5
>
> I must be missing something, but why typehinted variable
> should have any
> default except for null anyway? If someone says "I want only MyClass
> here!", why he should be able to put 5 there?