2015-02-11 13:25 GMT+02:00 Dmitry Stogov <[email protected]>:
>
> yes. some special attributes. requires/ensures/invariant
>
>
>> Oh, and <<>> syntax is *ugly* ;)
>>
>
> It's from HHVM. I don't like it as well, please, propose the better one.
>
I like syntax, like a switch:
function add(int $a, int $b) : int
case $a > 0:
case $b > 0:
return($ret, $ret > 0, "something wrong")
{
return $a + $b;
}
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php