<?php $args = [ ...['z' => 2, 'x' => 3], ...['y' => 1, 'x' => 4], ]; class Foo { public function __construct(int $x, int $y, int $z) { echo <<<OUTPUT x = $x y = $y z = $z OUTPUT; } } new Foo(...$args);
You have javascript disabled. You will not be able to edit any code.