3v4l.org

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

preferences:
44.72 ms | 402 KiB | 5 Q