On Tue, 11 Feb 2020 at 19:08, Dik Takken <d.h.j.tak...@freedom.nl> wrote:
> $($obj->Fot); > However, wrapped inside $(), which only accepts > functions and methods I don't think I meant that. I think it still should accept variables as well, so it would still be ambiguous as to whether it referred to the value of the property Fot of object $obj, or the method Fot on the $obj class. Also, just in general using something that has the same syntax as current PHP code, but a different meaning, sounds like a bad idea. > another possibility could be: closure(foo); That has the downside of exposing the implementation detail, that it's implemented through closures, which would be a regrettable choice if we ever decided to change the implementation details in the future. And it also has the downside of looking like a function call, but having different rules for what can be put inside it: function foo(); closure(foo); // fine. special_closure(foo); // syntax error, undefined constant foo. Although avoiding new syntax is good in general, if what can go inside it is different, then I think it requires a new syntax. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php