3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("a" => "AA", "b" => "BB", "c" => "CC"); $a2 = $a; $z = array("z" => array("z1"=>"ZZ1","z2"=>"ZZ2"), "x" =>"XX"); // 1 try to replace "b"=>"BB" by contents of $z array_splice($a, 1, 1, $z); print_r($a); // produces : Array ( [a] => AA [0] => Array ( [z1] => ZZ1 [z2] => ZZ2 ) [1] => XX [c] => CC ) echo "<hr>"; // 2 try to replace "b"=>"BB" by contents of $z as in manual array_splice($a, 1, 1, array($z)); print_r($a);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [a] => AA [0] => Array ( [z1] => ZZ1 [z2] => ZZ2 ) [1] => XX [c] => CC ) <hr>Array ( [a] => AA [0] => Array ( [z] => Array ( [z1] => ZZ1 [z2] => ZZ2 ) [x] => XX ) [1] => XX [c] => CC )

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