Re: [PHP-DEV] [RFC] [DISCUSSION] Compact Object Property Assignment

This is only part of a thread. view whole thread
  109085
March 17, 2020 01:22 jakob@givoni.dk (Jakob Givoni)
On Mon, Mar 16, 2020 at 9:26 AM Christian Schneider
<cschneid@cschneid.com> wrote:
> [] suggests an array but then is uses literals and = instead of 'strings'/$vars and => which looks wrong to my PHP eye. That's ok, square brackets are usually related to arrays and what I
want is something similar to array literals. The rest of the syntax is exactly the same as when you assign properties on a object currently.
> you want to initialise so many properties manually instead of through some sort of constructor. Yes, exactly. From the RFC:
"The purpose of this feature is to lighten the effort of populating data structures, especially medium to large ones." And as I say, since we don't have named parameters, this is a pragmatic alternative.