Re: [RFC]

From: Date: Thu, 13 Feb 2020 22:26:03 +0000
Subject: Re: [RFC]
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-108553@lists.php.net to get a copy of this message
On 13-02-2020 19:19, Mike Schinkel wrote: > But since I seem to be in the minority of caring about the name, let me propose the following > which was influenced by Larry Garfield's most recent post. Since it seems that people want the > convenience of a short notation to get a closure, how about this: > > function foo{} > > foo::function — Returns name of function > foo::fn — Returns closure for function > > Since using fn creates anonymous function closures it kinda > makes sense that ::fn would return a closure. That is somewhat confusing in my opinion, the two class constants are too similar. I would rather prefer: foo::function — Returns name of function foo::closure — Returns closure for function Regards, Dik Takken

« previous php.internals (#108553) next »