3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 'children' => [ 'default.php' => [], 'test.php' => [], 'test.bak' => [], 'default-2.php' => [], 'align-2.php' => [], 'align.tmp' => [], ] ]; uksort($arr['children'], function($a, $b){ $a = pathinfo($a); $b = pathinfo($b); return $a['filename'] == $b['filename'] ? $a['basename'] <=> $b['basename'] : $a['filename'] <=> $b['filename']; }); print_r(array_keys($arr['children']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jXqi
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'uksort'
          2        FETCH_DIM_W                                      $2      !0, 'children'
          3        SEND_REF                                                 $2
          4        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   21     5        SEND_VAL                                                 ~3
   14     6        DO_ICALL                                                 
   23     7        INIT_FCALL                                               'print_r'
          8        INIT_FCALL                                               'array_keys'
          9        FETCH_DIM_R                                      ~5      !0, 'children'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
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: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jXqi
function name:  {closure}
number of ops:  25
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        INIT_FCALL                                               'pathinfo'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
   16     6        INIT_FCALL                                               'pathinfo'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
   17    10        FETCH_DIM_R                                      ~6      !0, 'filename'
         11        FETCH_DIM_R                                      ~7      !1, 'filename'
         12        IS_EQUAL                                                 ~6, ~7
         13      > JMPZ                                                     ~8, ->19
   18    14    >   FETCH_DIM_R                                      ~9      !0, 'basename'
         15        FETCH_DIM_R                                      ~10     !1, 'basename'
         16        SPACESHIP                                        ~11     ~9, ~10
         17        QM_ASSIGN                                        ~12     ~11
         18      > JMP                                                      ->23
   19    19    >   FETCH_DIM_R                                      ~13     !0, 'filename'
         20        FETCH_DIM_R                                      ~14     !1, 'filename'
         21        SPACESHIP                                        ~15     ~13, ~14
         22        QM_ASSIGN                                        ~12     ~15
         23    > > RETURN                                                   ~12
   21    24*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.04 ms | 1018 KiB | 17 Q