3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array('one' => array( 'two' => 3, 'four' => array(5,6,7)),'eight' => array( 'nine'=> array('ten' =>11))); function aarray_to_vlue($akey,$val) { $array_key = array(); if(is_array($val)) { foreach($val as $key => $value) { if($akey != '') { $pkey = $akey.'/'.$key; } else { $pkey = $key; } if(is_array($value)) { $array_key = array_to_value($pkey,$value); } $array_key[$pkey] = $value; } return $array_key; } } print_r(aarray_to_vlue('',$data)); print_r($data);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function array_to_value() in /in/D4fKk:14 Stack trace: #0 /in/D4fKk(23): aarray_to_vlue('', Array) #1 {main} thrown in /in/D4fKk on line 14
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:
54.26 ms | 401 KiB | 8 Q