3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
158.9 ms | 1576 KiB | 10 Q