3 ms·
> in PHP you can just use arrays ^^ Which thankfully aren't as painful now! $cfg = [ 'path' => '.', 'mask' => 655 ]; Otherwise, if we
by k3n 14y ago
> in PHP you can just use arrays ^^
Which thankfully aren't as painful now!
$cfg = [
'path' => '.',
'mask' => 655
];
Otherwise, if we still had to write "array" each time, I'd be more supportive of the object-literal, although I do think there's value in the literal but mostly to make the language similar to other languages with similar constructs (js, py).