3v4l.org

run code in 300+ PHP versions simultaneously
<?php $registerArray = array( 'Sleutel' => 1, 'Gebouw_ID' => '20250043814' , 'Toestel_ID' => 'BE071 (S035)' , 'object_id' => null, 'Code MCS' => '2_22_00350', 'Type_deur' => 'Schuifpoort', 'Merk' => 'Came' , 'Type_Merk' => 'Schuifpoort', 'Locatie' => 'Station', 'Op_Controller' => '', 'Omschrijving' => 'ANTCE_PRSCH/BRCOU_Ploegstraat inkom portier', 'Voedingskast' => '', 'Automaat' => '', 'Eigenaar' => '', 'Keuzeschakelaar' => '', 'Toegangssleutels' => '', 'Indienstname' => '0000-00-00', 'Onderhoudsfirma' => '61/92/13/00851', 'Onderhoudsnummer_contractant' => '', 'Opmerkingen' => '10_SLO_026C', 'OPMonderhoud' => '', 'id' => 10, 'register' => 'register_pompen', 'sleutel' => 1, 'action' => 'create', 'date' => '2019-03-22 08:52:39', 'status' => 1, 'done' => 0 ); $order = array( 'object_id', 'Code MCS', 'DeviceType', 'Toestel_ID', 'Locatie', 'Type_deur', 'Op_Controller', 'Omschrijving', '', '', '', '', '', '', 'Onderhoudsfirma', 'Onderhoudsnummer_contractant', 'Eigenaar', 'Toegangssleutels', 'Indienstname', '', 'Type_Merk', '', '', '', 'Merk', 'Sleutel', 'Gebouw_ID', '', '', '', 'Opmerkingen', 'OPMonderhoud' ); $newArray = array(); foreach ($order as $k) { if (array_key_exists($k, $registerArray)) { $newArray[] = $registerArray[$k]; } else { $newArray[] = ''; } } print_r($newArray);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => [1] => 2_22_00350 [2] => [3] => BE071 (S035) [4] => Station [5] => Schuifpoort [6] => [7] => ANTCE_PRSCH/BRCOU_Ploegstraat inkom portier [8] => [9] => [10] => [11] => [12] => [13] => [14] => 61/92/13/00851 [15] => [16] => [17] => [18] => 0000-00-00 [19] => [20] => Schuifpoort [21] => [22] => [23] => [24] => Came [25] => 1 [26] => 20250043814 [27] => [28] => [29] => [30] => 10_SLO_026C [31] => )

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