On Fri, 15 Mar 2019 at 15:16, Levi Morrison <le...@php.net> wrote: > We could also add an object literal > syntax for creating ad-hoc stdClass objects like so: `$obj = { x: 1, > y: 1}`. This has an ambiguity, but I believe I have solved the issue > without too much trouble once before. >
Minor side-note, but I'd love to see things like this creating anonymous classes, now we have them, rather than stdClass objects. So $obj = { x: 1, y: 1 } would de-sugar to $obj = new class { public $x=1; public $y=1; } Regards, -- Rowan Collins [IMSoP]