3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "size" => "P", "code" => ["C01","B01","A02"] ]; foreach($arr["code"] as $item){ @$newArr[] = [ "size" => "P", "code" => $item ]; } var_dump($newArr);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(2) { ["size"]=> string(1) "P" ["code"]=> string(3) "C01" } [1]=> array(2) { ["size"]=> string(1) "P" ["code"]=> string(3) "B01" } [2]=> array(2) { ["size"]=> string(1) "P" ["code"]=> string(3) "A02" } }

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:
45.12 ms | 402 KiB | 8 Q