Re: [RFC] [VOTE] Allow null and false as stand-alone types

From: Date: Thu, 17 Mar 2022 16:09:00 +0000
Subject: Re: [RFC] [VOTE] Allow null and false as stand-alone types
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-117358@lists.php.net to get a copy of this message
On Thu, 17 Mar 2022 at 15:54, Levi Morrison <levi.morrison@datadoghq.com> wrote: > On Sat, Mar 12, 2022 at 10:32 AM G. P. B. <george.banyard@gmail.com> > wrote: > > > > I've started voting for the Allow null and false as stand-alone types > RFC: > > https://wiki.php.net/rfc/null-false-standalone-types > > > > Voting will last for 2 weeks until 26th of March. > > > > Best regards, > > > > George P. Banyard > > Hello, > > I have voted yes, despite this clause: > > > Moreover, a function which has a void return type must only use return; > whereas one with null must use return null;. > > IMO, it should allow any expression including just return; and > let > the runtime fail if it needs to. > This behaviour is the current behaviour in PHP, see: https://3v4l.org/1m0Mk and https://3v4l.org/d19rd It might make sense to change this, but this is out of scope for this RFC. Best regards, George P. Banyard

« previous php.internals (#117358) next »