3v4l.org

run code in 300+ PHP versions simultaneously
<?php $asd = ['asd' => ['jkf' => ['qwe' => 'wer', 'asd' => '123', 'kjk' => 'sdf', '456' => 'zxc']], 'dfg', 'test' => ['ert' => '234'], 'cvf']; function recurse($array,$key=''){ static $output=[]; foreach($array as $k=>$v){ if(is_array($v)){ recurse($v,$key?$key.'['.$k.']':$k); }else{ $output[$key?$key.'['.$k.']':$k]=$v; } } return $output; } var_export(recurse($asd));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'asd[jkf][qwe]' => 'wer', 'asd[jkf][asd]' => '123', 'asd[jkf][kjk]' => 'sdf', 'asd[jkf][456]' => 'zxc', 0 => 'dfg', 'test[ert]' => '234', 1 => 'cvf', )

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