3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array( "texas" => array( "withers field" => array("name" => "beam pump 1"), "withers field B" => array("name" => "beam pump 1") ) ); function multiLevelSort($arr) { if (!is_array($arr)) { return $arr; } else { $arr = ksort($arr,SORT_STRING); foreach ($arr as $val) { $val = multiLevelSort($val); } } } echo(multiLevelSort($test)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cQlaC
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   24     1        INIT_FCALL                                               'multilevelsort'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
   26     5      > RETURN                                                   1

Function multilevelsort:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/cQlaC
function name:  multiLevelSort
number of ops:  20
compiled vars:  !0 = $arr, !1 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        TYPE_CHECK                                  128  ~2      !0
          2        BOOL_NOT                                         ~3      ~2
          3      > JMPZ                                                     ~3, ->6
   12     4    > > RETURN                                                   !0
          5*       JMP                                                      ->19
   16     6    >   INIT_FCALL                                               'ksort'
          7        SEND_REF                                                 !0
          8        SEND_VAL                                                 2
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !0, $4
   17    11      > FE_RESET_R                                       $6      !0, ->18
         12    > > FE_FETCH_R                                               $6, !1, ->18
   19    13    >   INIT_FCALL_BY_NAME                                       'multiLevelSort'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $7      
         16        ASSIGN                                                   !1, $7
   17    17      > JMP                                                      ->12
         18    >   FE_FREE                                                  $6
   23    19      > RETURN                                                   null

End of function multilevelsort

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.86 ms | 1399 KiB | 16 Q