3v4l.org

run code in 300+ PHP versions simultaneously
<?php class XXX{ const AR = [1,2,3]; } function test(...$args) { var_dump($args); } test(... (1)); // [1, 2, 3] // [1, 2, 3] test(...XXX::AR); // [1, 2, 3] test(...new ArrayIterator([1, 2, 3])); // [1, 2, 3]

preferences:
40.83 ms | 402 KiB | 5 Q