3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = Array ( Array ( 'id' => 6, 'title' => 'zzz', 'parentID' => 0, 'parentName' =>'', 'section' => 'articles', 'sort' => 0, 'level' => 0 ), Array ( Array ( 'id' => 7, 'title' => 7, 'parentID' => 6, 'parentName' => '', 'section' => 'articles', 'sort' => 0, 'level' => 0 ), Array ( Array ( 'id' => 8, 'title' => 8, 'parentID' => 7, 'parentName' =>'' , 'section' => 'articles', 'sort' => 0, 'level' => 0 ) ) ), Array ( 'id' => 1, 'title' => '?a?3?a', 'parentID' => 0, 'parentName' => '', 'section' => 'articles', 'sort' => 0, 'level' => 0 ), Array ( Array ( 'id' => 4, 'title' => 4, 'parentID' => 1, 'parentName' => '', 'section' => 'articles', 'sort' => 0, 'level' => 0 ), Array ( 'id' => 5, 'title' => 5, 'parentID' => 1, 'parentName' => '', 'section' => 'articles', 'sort' => 0, 'level' => 0 ) ) ); function arrayStack( $array, $dash ){ foreach($array as $value){ if(isset($value['id'])){ echo str_repeat("-", $dash).$value['id'].'<br/>'; }else{ $dash++; arrayStack( $value, $dash ); $dash--; } } } arrayStack( $myArray, 0 );
Output for git.master, git.master_jit, rfc.property-hooks
6<br/>-7<br/>--8<br/>1<br/>-4<br/>-5<br/>

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:
38.33 ms | 401 KiB | 8 Q