3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(...$args) { var_dump($args); } function gen() { yield 1.23 => 123; } foo(...gen());
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Uncaught Error: Keys must be of type int|string during argument unpacking in /in/Un8Tq:9 Stack trace: #0 {main} thrown in /in/Un8Tq on line 9
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Cannot unpack Traversable with non-integer keys in /in/Un8Tq:9 Stack trace: #0 {main} thrown in /in/Un8Tq on line 9
Process exited with code 255.
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34
array(1) { [0]=> int(123) }

preferences:
250.44 ms | 402 KiB | 302 Q