3v4l.org

run code in 300+ PHP versions simultaneously
<?php $indexes = [ 'id_1_2_3_0' => 1, 'id_1_2_-0.25_0' => 2, 'id_1_2_1.75_0' => 3, 'id_1_2_-4_0' => 4, 'id_1_2_0_0' => 5, 'id_1_2_-1.25_0' => 6, 'if_1_2_0_0' => 7, 'id_1_3_0_0' => 8, 'id_1_2_0_z' => 9, ]; [$c1, $c2, $c3, $c4, $c5] = array_map(null, ...array_map(fn($k) => explode('_', $k), array_keys($indexes))); array_multisort($c1, $c2, $c3, $c4, $c5, $indexes); var_export($indexes);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WHqIZ
function name:  (null)
number of ops:  37
compiled vars:  !0 = $indexes, !1 = $c1, !2 = $c2, !3 = $c3, !4 = $c4, !5 = $c5
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 null
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
          5        SEND_VAL                                                 ~7
          6        INIT_FCALL                                               'array_keys'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9        SEND_VAR                                                 $8
         10        DO_ICALL                                         $9      
         11        SEND_UNPACK                                              $9
         12        CHECK_UNDEF_ARGS                                         
         13        DO_ICALL                                         $10     
         14        FETCH_LIST_R                                     $11     $10, 0
         15        ASSIGN                                                   !1, $11
         16        FETCH_LIST_R                                     $13     $10, 1
         17        ASSIGN                                                   !2, $13
         18        FETCH_LIST_R                                     $15     $10, 2
         19        ASSIGN                                                   !3, $15
         20        FETCH_LIST_R                                     $17     $10, 3
         21        ASSIGN                                                   !4, $17
         22        FETCH_LIST_R                                     $19     $10, 4
         23        ASSIGN                                                   !5, $19
         24        FREE                                                     $10
   15    25        INIT_FCALL                                               'array_multisort'
         26        SEND_REF                                                 !1
         27        SEND_REF                                                 !2
         28        SEND_REF                                                 !3
         29        SEND_REF                                                 !4
         30        SEND_REF                                                 !5
         31        SEND_REF                                                 !0
         32        DO_ICALL                                                 
   16    33        INIT_FCALL                                               'var_export'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                                 
         36      > 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/WHqIZ
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '_'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.25 ms | 1014 KiB | 18 Q