I love the idea! The syntax for new objects looks a little verbose – would it be possible to use
$foo = new Foo()[ property1 = "hello", property2 = 5, ]; as an alternative to $foo = (new Foo())->[ property1 = "hello", property2 = 5, ]; On Mon, 16 Mar 2020 at 07:48, Jakob Givoni <ja...@givoni.dk> wrote: > Hello Internals, > > I'm opening up my new RFC for discussion: > > https://wiki.php.net/rfc/compact-object-property-assignment > - A pragmatic approach to object literals > > Let me know what you think! > > Best, > Jakob > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >