On Wed, 2008-04-30 at 09:23 +0300, Arvids Godjuks wrote:
> 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
Function is a reserved keyword in PHP anyway, it would cause problems in
numerous places if it was used as a type.
> $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,
Well this is two parts, class/array hinting and scalar hinting. Class
and array hinting is already implemented, so for now I'm just pushing
for that in return types.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php