On Sun, Aug 9, 2020 at 8:34 PM Jordi Boggiano <j.boggi...@seld.be> wrote:
> On 09/08/2020 00:17, Sara Golemon wrote: > > Do we expect this to work? > > > > $foo = new stdClass; > > $foo->bar = "Hello"; > > echo "$foo?->bar world\n"; > > > > Because at the moment it doesn't: https://3v4l.org/nLv3l > > > > -Sara > > Can't say I'm big on interpolation but I'd definitely expect this to > work because why not? > > I think if it can be reasonably fixed it probably would make sense for > consistency and WTF-avoidance if anything. > > Best, > Jordi > Agree. I don't think the question of whether it is useful should come into this, it's a matter of language consistency. There could be some leeway here if we say that we have plans to deprecate the "$x->y" syntax in the future anyway and don't want to extend it anymore -- but I don't believe we have such plans at the present time. Nikita