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 { 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/4u1Ja
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 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/4u1Ja
function name:  multiLevelSort
number of ops:  19
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                                                      ->18
   16     6    >   INIT_FCALL                                               'ksort'
          7        SEND_REF                                                 !0
          8        SEND_VAL                                                 2
          9        DO_ICALL                                                 
   17    10      > FE_RESET_R                                       $5      !0, ->17
         11    > > FE_FETCH_R                                               $5, !1, ->17
   19    12    >   INIT_FCALL_BY_NAME                                       'multiLevelSort'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $6      
         15        ASSIGN                                                   !1, $6
   17    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $5
   23    18      > RETURN                                                   null

End of function multilevelsort

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.31 ms | 1399 KiB | 16 Q