3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( '31' => array( 'Amsterdam' => array(), 'Rotterdam' => array(), 'Den Haag' => array(), 'Utrecht' => array(), 'Eindhoven' => array(), 'Tilburg' => array(), 'Almere' => array( '036' => array( 'BU00340212' => array( 'name' => 'Muziekwijk Noord', 'residents' => array( 'Henk', 'Dirk', 'Jaap', ), ), 'BU00340213' => array( 'name' => 'Muziekwijk Zuid', 'residents' => array( 'Wim', 'Pim', 'Jim', 'Tim', ), ), ) ), 'Groningen' => array(), 'Breda' => array(), 'Nijmegen' => array(), ) ); function recursive($data, $countryCode = null, $countryData = null, $city = null, $cityData = null, $netNummer = null, $netData = null, $cbscode = null, $cbsData = null, $residents = null){ if($residents){ $resident = array_shift($residents); echo $city . '(netnummer: ' . $netNummer . ')(cbscode: ' . $cbscode .'): ' . $resident . '<br>'; if($residents){ recursive($data, $countryCode, $countryData, $city, $cityData, $netNummer, $netData, $cbscode, $cbsData, $residents); } return null; } if($cbscode && $cbsData){ $residents = $cbsData['residents']; recursive($data, $countryCode, $countryData, $city, $cityData, $netNummer, $netData, $cbscode, $cbsData, $residents); } if($countryCode && $countryData && $netData){ $cbscode = key($netData); $cbsData = array_shift($netData); recursive($data, $countryCode, $countryData, $city, $cityData, $netNummer, $netData, $cbscode, $cbsData); } if($countryCode && $countryData && $city && $cityData){ $netNummer = key($cityData); $netData = array_shift($cityData); recursive($data, $countryCode, $countryData, $city, $cityData, $netNummer, $netData); } if($countryCode && $countryData){ $city = key($countryData); $cityData = array_shift($countryData); recursive($data, $countryCode, $countryData, $city, $cityData); } if($data){ $countryCode = key($data); $countryData = array_shift($data); if($countryData){ recursive($data, $countryCode, $countryData); } } return null; } recursive($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Almere(netnummer: 036)(cbscode: BU00340212): Henk<br>Almere(netnummer: 036)(cbscode: BU00340212): Dirk<br>Almere(netnummer: 036)(cbscode: BU00340212): Jaap<br>Almere(netnummer: 036)(cbscode: BU00340213): Wim<br>Almere(netnummer: 036)(cbscode: BU00340213): Pim<br>Almere(netnummer: 036)(cbscode: BU00340213): Jim<br>Almere(netnummer: 036)(cbscode: BU00340213): Tim<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:
169 ms | 406 KiB | 5 Q