Re: Re: [RFC] [PHP 6] Uniform Variable Syntax

From: Date: Wed, 02 Jul 2014 16:09:49 +0000
Subject: Re: Re: [RFC] [PHP 6] Uniform Variable Syntax
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-75168@lists.php.net to get a copy of this message
On 2 Jul 2014, at 17:04, Lazare Inepologlou <linepogl@gmail.com> wrote: > Yes, in the RFC, you mention that this will be possible: > > ($obj->closure)() > > While this is very welcome, I was wandering if we could skip the extra > parenthesis, like this: > > $obj->closure() Sadly, it wouldn’t be possible as the two are very different. Properties and methods occupy completely different namespaces, and while methods are case-insentivie, properties are case-sensitive! ($obj->closure)() gets a property then calls it, while $obj->closure() calls a method. Perhaps this might change in future, but the RFC doesn’t propose that. -- Andrea Faulds http://ajf.me/

« previous php.internals (#75168) next »