Re: [RFC] [Discussion] Allow a trailing comma in function calls

From: Date: Fri, 27 Oct 2017 11:17:22 +0000
Subject: Re: [RFC] [Discussion] Allow a trailing comma in function calls
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-100960@lists.php.net to get a copy of this message
On 24 October 2017 at 17:14, Sara Golemon <pollita@php.net> wrote: > On Tue, Oct 24, 2017 at 11:37 AM, Peter Cowburn <petercowburn@gmail.com> > wrote: > > I know it's late in the game, but I have a quick question. This RFC > > includes a couple of "Not really a function" functions (namely isset() > and > > unset()) that will also be able to have a trailing comma, but I'm failing > > to find the discussion on including "not really a function" calls in this > > RFC. Why were those specific non-functions choices included? Why only > those? > > > I'd guess because those are the only constructs which appear > function-like *and* exhibit variadic behavior. > empty/die/exit/print/require/include/require_once/include_ > once/__HALT_COMPILER > don't have a variadic mode so allowing trailing commas in them would > be pointless. > That's a fair point, then maybe we should consider declare() too? Also, I know that "echo" is a "doesn't even look like a function" but can that be considered as if we're changing any language constructs at all in this RFC, then that might benefit too. Note, I'm just saying "consider" on purpose, rather than suggesting any change to the RFC actually be made. > > -Sara >

« previous php.internals (#100960) next »