3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('a'=>array('b'=>array('c'=>array('d'=>123,'s'=>4),'r'=>3),'q'=>2),'p'=>1); $keys1 = array('a','b','c'); $keys2 = array('a','b'); $keys = $keys1; // set this as "search value" $value = $a; // create a copy of original array. Maybe not needed? Foreach($keys as $key){ // loop keys in search value $value = $value[$key]; } Var_dump($value); // dump the search return.
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["d"]=> int(123) ["s"]=> int(4) }

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:
123.75 ms | 405 KiB | 5 Q