3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testArray = array ( 'BrowseNodeId' => 343505011, 'Name' => 'Kinderzimmer', 'Ancestors' => array ( 'BrowseNode' => array ( 'BrowseNodeId' => 3517801, 'Name' => 'Mbel', 'Ancestors' => array ( 'BrowseNode' => array ( 'BrowseNodeId' => 3312261, 'Name' => 'Mbel & Wohnaccessoires', 'Ancestors' => array ( 'BrowseNode' => array ( 'BrowseNodeId' => 3169011, 'Name' => 'Kategorien', 'IsCategoryRoot' => 1, 'Ancestors' => array ( 'BrowseNode' => array ( 'BrowseNodeId' => 3167641, 'Name' => 'Kche & Haushalt', ) ) ) ) ) ) ) ) ) ; function getAllInfo($inputArray, $outputArray = array()) { $outputArray[] = array( 'BrowseNodeId' => $inputArray['BrowseNodeId'], 'Name' => $inputArray['Name'] ); if(isset($inputArray['Ancestors']['BrowseNode'])) { return getAllInfo($inputArray['Ancestors']['BrowseNode'], $outputArray); } return $outputArray; } var_dump(getAllInfo($testArray));
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { [0]=> array(2) { ["BrowseNodeId"]=> int(343505011) ["Name"]=> string(12) "Kinderzimmer" } [1]=> array(2) { ["BrowseNodeId"]=> int(3517801) ["Name"]=> string(4) "Mbel" } [2]=> array(2) { ["BrowseNodeId"]=> int(3312261) ["Name"]=> string(22) "Mbel & Wohnaccessoires" } [3]=> array(2) { ["BrowseNodeId"]=> int(3169011) ["Name"]=> string(10) "Kategorien" } [4]=> array(2) { ["BrowseNodeId"]=> int(3167641) ["Name"]=> string(15) "Kche & Haushalt" } }

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:
29.79 ms | 407 KiB | 5 Q