Only array literals were implemented though, not objects. That was long overdue, but in the age of JSON we live in it's not enough. For instance, the following in Javascript:
I know, note what I said "...maybe just not enough. It would definitely be a welcome addition to the language"
People have proposed it and commented on it but it does not get enough support (votes) from senior devs to get included. Maybe with more requests it will get included finally.
var myObject = { memberOne: 'some string value', memberTwo: { subMemberOne: 42, subMemberTwo: 48 }, memberThree: false };
Has this as the closest equivalent in PHP right now:
$myObject = (object) [ "memberOne" => 'some string value', "memberTwo" => (object) [ "subMemberOne": 42, "subMemberTwo": 48 ], "memberThree" => false ];
It's verbose, really, I would very much prefer a native solution that doesn't enforce casting from array and quotation around property names.