Monday, 22 June 2015

PHP 7 For Developers

Return Types

function myfunction(): array {
    return [];
}

he return types can only be what we have for types right now, meaning no scalar values, no return types like stringintbool, etc. This means that your methods and functions that return such values will still be unsigned. You can remedy this by returning instances of wrappers for such values, but that’s overkill in the vast majority of cases.







No comments:

Post a Comment