3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a() { yield 0 => 'first'; yield 0 => 'second'; } function b() { yield 0 => 'first'; yield '0' => 'second'; } function c() { yield '0' => 'first'; yield '0' => 'second'; } function test(...$args) { var_dump($args); } test(...a()); echo "\n"; test(...b()); echo "\n"; test(...c());
Output for git.master_jit, git.master
array(2) { [0]=> string(5) "first" [1]=> string(6) "second" } array(2) { [0]=> string(5) "first" ["0"]=> string(6) "second" } Fatal error: Uncaught Error: Named parameter $0 overwrites previous argument in /in/qNMep:23 Stack trace: #0 {main} thrown in /in/qNMep on line 23
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
30.46 ms | 405 KiB | 5 Q