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);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/NEetX
function name:  (null)
number of ops:  19
compiled vars:  !0 = $registerArray, !1 = $order, !2 = $newArray, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   33     1        ASSIGN                                                   !1, <array>
   68     2        ASSIGN                                                   !2, <array>
   69     3      > FE_RESET_R                                       $7      !1, ->14
          4    > > FE_FETCH_R                                               $7, !3, ->14
   70     5    >   ARRAY_KEY_EXISTS                                         !3, !0
          6      > JMPZ                                                     ~8, ->11
   71     7    >   FETCH_DIM_R                                      ~10     !0, !3
          8        ASSIGN_DIM                                               !2
          9        OP_DATA                                                  ~10
   70    10      > JMP                                                      ->13
   73    11    >   ASSIGN_DIM                                               !2
         12        OP_DATA                                                  ''
   69    13    > > JMP                                                      ->4
         14    >   FE_FREE                                                  $7
   78    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.36 ms | 1010 KiB | 14 Q