On 20/05/2021 21:54, Kamil Tekiela wrote:
This would be less confusing than the (...) syntax IMHO. Of course this still has the same ambiguity as Rowan points out. Is ::$objA->methA a property or a method? We could solve this problem by specifying the syntax to always refer to methods/functions. Parentheses could be used to enforce access to property, e.g. ::($objA->methA) would evaluate the value stored in the public property of the object $objA
This is precisely the kind of "solution" that I referred to as easy for the parser but confusing for humans.
::$objA->methA // method (::$objA->methA) // method ::($objA->methA) // property ::($objA)->methA // method? (::$objA)->methA // attempt to access a property of a Closure object? It's just a mess, IMHO Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php