Re: Return type hinting patch
| From: | Arvids Godjuks | Date: | Wed, 30 Apr 2008 06:23:17 +0000 |
| Subject: | Re: Return type hinting patch | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37332@lists.php.net to get a copy of this message | ||
I'm +1 for this syntax
function int myfunction(int $param)
{
return $someint;
}
C/C++ like, easy to understand
And bad idea about making a return type "function" - looks very useless and
will not be used a lot. Work with objects with methods returning an object
of some kind, then you can do
$object->method()->method2()->method3();
P.S. I think this thread should be merged with function param type hinting
because they come together and should be implemented together,