Re: Something|null return type declaration
| From: | Ben Scholzen 'DASPRiD' | Date: | Thu, 03 Dec 2015 15:43:55 +0000 |
| Subject: | Re: Something|null return type declaration | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89575@lists.php.net to get a copy of this message | ||
On 03.12.2015 15:58, Tom Worster wrote:
Not being a regular on this list, I want to ask if there is history of
discussion of a "something or nul" return type declaration for PHP 7.
I'm only interested in this narrowly defined change, the PHP equivalent of a
/** @return Something|null */ dockblock tag *without* generalizing to `/**
@return A|B|C... */`.
If this is already argued to death, or even just a bit, I'd like to read the
RFC(s) and discussion. Grateful for pointers.
There's an RFC for union types:
https://wiki.php.net/rfc/union_types
As far as I know, there was a general consent against a simple nullable hint.
--
Ben Scholzen 'DASPRiD'
Community Review Team Member | mail@dasprids.de
Zend Framework | http://www.dasprids.de