Re: How to get the 'return type' of a function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 Feb 2010 23:44:17 +0800, Nathan Rixham wrote:



As PHP is loosely typed, the only real way around this is to specify a
return type in a PHPDoc block, then parse that using reflection to get
the @return parameter.

another option is to use something like haXe which is an ECMA style
typed language that compiles to multiple targets, one of which is PHP.


Thanks Nathan for your comment. But I think the PHPDoc stuff is only for
user defined functions, right? The Reflection::getDocComment() has no idea
about the built-in functions.

--
Dasn


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux