3v4l.org

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

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

End of function multilevelsort

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.47 ms | 1398 KiB | 18 Q