Re: PHP5 Type Hints
| From: | Aidan Lister | Date: | Sun, 03 Oct 2004 05:06:25 +0000 |
| Subject: | Re: PHP5 Type Hints | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198522@lists.php.net to get a copy of this message | ||
Hi Gerald,
If you did see something like that, it was a mistake in our manual :)
I've documented typehinting now, though it will take a while to show up in
the manual.
http://php.net/language.oop5.typehinting
Kind Regards,
Aidan
"Gerard Samuel" <php-general@trini0.org> wrote in message
news:415F808A.5000604@trini0.org...
> Curt Zirzow wrote:
>> * Thus wrote Gerard Samuel:
>>
>>>Im unable to find documentation on this.
>>>Does one exist? If so can you point me to it.
>>
>>
>> I dont think anything officially exist in the manual, yet. The type
>> hint can only be an Object, and will cause a fatal error if not the
>> paticular object isn't passed.
>>
>
> Thanks. I could have sworn, I saw something somewhere,
> that led me to believe that arguments can be casted.
> I.E.
> function foo(int $foo)
> {
> // $foo will be casted as an integer
> }