3v4l.org

run code in 300+ PHP versions simultaneously
<?php function zeroOneTwo($one, $two, $three) { return [$one, $two, $three]; } function abc($b, $c, $a) { return [$a, $b, $c]; } $numericKeyedArray = [4,5,6]; var_export(abc(...$numericKeyedArray)); echo "\n---\n"; var_export(zeroOneTwo(...$numericKeyedArray)); echo "\n===\n"; $nonNumericKeyedArray = ['c' => 'sea', 'a' => 'A', 'b' => 'bee']; echo "\n---\n"; var_export(abc(...$nonNumericKeyedArray)); echo "\n===\n"; var_export(zeroOneTwo(...$nonNumericKeyedArray));

preferences:
26.88 ms | 404 KiB | 5 Q