Re: Return type declaration and &return.falseforfailure;

From: Date: Mon, 12 Feb 2018 10:26:02 +0000
Subject: Re: Return type declaration and &return.falseforfailure;
References: 1 2 3 4 5 6  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969386886@lists.php.net to get a copy of this message
Hmm. I've always thought that null was no result. https://3v4l.org/pjHBl#vhhvm-3213 With the new void return type, which is explicitly saying nothing is returned, null is still assigned as it indicates a nothing, not a something.. On 11 February 2018 at 23:15, Christoph M. Becker <cmbecker69@gmx.de> wrote: > On 11.02.2018 at 23:56, Richard Quadling wrote: > > > We should be adding <void> if there is no return value. If a function can > > return null, then that's a valid return type. […] > > Most functions return NULL, if you give them invalid parameter types, > e.g. <https://3v4l.org/UIYGh>. > > > […] The issue here is that many > > of the PHP functions return way too many types. > > ACK. However, changing that constitutes a BC break, and as such has to > be thoroughly investigated (likely on a case by case basis), and most > likely would require the RFC process (< ìÀŠ > [O»§�RP€Rhttps://wiki.php.net/rfc/howto>). > > -- > Christoph M. Becker > -- Richard Quadling

« previous php.doc (#969386886) next »