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' ); uksort($registerArray, function ($a, $b) use ($order) { return array_search($a, $order) > array_search($b, $order); }); print_r($registerArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vRZUR
function name:  (null)
number of ops:  12
compiled vars:  !0 = $registerArray, !1 = $order
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   33     1        ASSIGN                                                   !1, <array>
   69     2        INIT_FCALL                                               'uksort'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        BIND_LEXICAL                                             ~4, !1
   71     6        SEND_VAL                                                 ~4
   69     7        DO_ICALL                                                 
   73     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vRZUR
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $order
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   69     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   70     3        INIT_FCALL                                               'array_search'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                         $3      
          7        INIT_FCALL                                               'array_search'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $4      
         11        IS_SMALLER                                       ~5      $4, $3
         12      > RETURN                                                   ~5
   71    13*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
275.25 ms | 1012 KiB | 16 Q