Re:PHP 7.4
by asdasdasdasdwd on Thursday November 28, 2019 @11:47AM
(#21658627)
I think there is an rfc for object initialization similar to C#:
$city = new City {name: 'Berlin, population: 374800};
Edit: found it (and it uses = instead of :) https://wiki.php.net/rfc/object-initializer
I'd love to have a shorter object syntax, too. For the time being, I'll make do with
which is a little verbose but gets the job done.