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) { $ai = array_search($a, $order); $bi = array_search($b, $order); return ($ai === false ? INF : $ai) > ($bi === false ? INF : $bi); }); print_r($registerArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rPh8t
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
   73     6        SEND_VAL                                                 ~4
   69     7        DO_ICALL                                                 
   75     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
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
Branch analysis from position: 22
filename:       /in/rPh8t
function name:  {closure}
number of ops:  26
compiled vars:  !0 = $a, !1 = $b, !2 = $order, !3 = $ai, !4 = $bi
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                                         $5      
          7        ASSIGN                                                   !3, $5
   71     8        INIT_FCALL                                               'array_search'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !4, $7
   72    13        TYPE_CHECK                                    4          !3
         14      > JMPZ                                                     ~9, ->17
         15    >   QM_ASSIGN                                        ~10     INF
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~10     !3
         18    >   TYPE_CHECK                                    4          !4
         19      > JMPZ                                                     ~11, ->22
         20    >   QM_ASSIGN                                        ~12     INF
         21      > JMP                                                      ->23
         22    >   QM_ASSIGN                                        ~12     !4
         23    >   IS_SMALLER                                       ~13     ~12, ~10
         24      > RETURN                                                   ~13
   73    25*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.81 ms | 1017 KiB | 16 Q