Re: [RFC] Type hints
| From: | Stanislav Malyshev | Date: | Sun, 09 May 2004 10:58:48 +0000 |
| Subject: | Re: [RFC] Type hints | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9753@lists.php.net to get a copy of this message | ||
DR>>I was also wondering if the following would also work:
DR>>
DR>>class b extends a { }
DR>>
DR>>function foo (a $obj) { }
DR>>
DR>>$b = new b;
DR>>foo($b);
DR>>
DR>>(ie, an inherited class also passes the hint check)
This should definitely work. As I see from current code, it also does :)
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115