Robin Burchell wrote:
Just a random thought I have from reading over that:
Would it not be more 'natural' to change 'function' to indicate a
method with a variant return type, and allow e.g.
'int somefunc()' instead of 'function (int) somefunc()' to indicate an
int return?
it would break all php code existing so far; the only real way to
implement return value types would be as such
public static function somefunc():int {
this would allow the return type to be optional and leave all existing
code functional; likewise it could be implemented for any style of
php'ing, thus:
#php4 style class method or normal procedural function
function dosumit():int {
type hints are all ready there so adding primitives /should/ be possible
without any bc issues
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php