3 ms·
The scalar and return types are really a great improvement IMHO, I can't wait for Doctrine to fully support it for code generation. But one thing which is miss
by allan_s 11y ago
The scalar and return types are really a great improvement IMHO, I can't wait for Doctrine to fully support it for code generation.
But one thing which is missing is the nullable types, as currently it's either you always return a string and you can use scalar typing, or you sometimes return null and you can't use it (which I'm okay with)
https://wiki.php.net/rfc/nullable_types https://wiki.php.net/rfc/nullable_types
https://github.com/php/php-src/pull/1045 https://github.com/php/php-src/pull/1045
With this, it will permit to have even better static analysis "a la" HHVM/hack (i.e detecting that you haven't check for is_null in your code