3v4l.org

run code in 300+ PHP versions simultaneously
<?php $files=array("home--lists--country--create_a_country.jpg","home--lists--country--list_countries.jpg","profile--edit--account.jpg","profile--my_account.jpg","shop--orders--list_orders.jpg"); $master_array=array(); foreach($files as $file) { $file=explode("--",$file); $cache=end($file); while($level=prev($file)) { $cache=array($level=>$cache); } $master_array=array_merge_recursive($master_array,$cache); } print_r($master_array);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [home] => Array ( [lists] => Array ( [country] => Array ( [0] => create_a_country.jpg [1] => list_countries.jpg ) ) ) [profile] => Array ( [edit] => account.jpg [0] => my_account.jpg ) [shop] => Array ( [orders] => list_orders.jpg ) )

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.65 ms | 407 KiB | 5 Q