3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'D' => array( 'C' => array('c', 'b', 'a'), 'B' => 'bvalue', 'A' => array('a', 'c', 'b'), ), 'C' => 'cvalue', 'B' => 'bvalue', 'A' => array( 'Z' => 'zvalue', 'A' => 'avalue', 'B' => 'bvalue', ) ); function recursive_ksort(&$array) { foreach ($array as &$v) { if (is_array($v)) { recursive_ksort($v); } } ksort($array); } recursive_ksort($array); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R18iT
function name:  (null)
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   27     1        INIT_FCALL                                               'recursive_ksort'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0          
   28     4        INIT_FCALL                                               'var_export'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function recursive_ksort:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/R18iT
function name:  recursive_ksort
number of ops:  14
compiled vars:  !0 = $array, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1      > FE_RESET_RW                                      $2      !0, ->9
          2    > > FE_FETCH_RW                                              $2, !1, ->9
   20     3    >   TYPE_CHECK                                  128          !1
          4      > JMPZ                                                     ~3, ->8
   21     5    >   INIT_FCALL_BY_NAME                                       'recursive_ksort'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
   19     8    > > JMP                                                      ->2
          9    >   FE_FREE                                                  $2
   24    10        INIT_FCALL                                               'ksort'
         11        SEND_REF                                                 !0
         12        DO_ICALL                                                 
   25    13      > RETURN                                                   null

End of function recursive_ksort

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.49 ms | 1002 KiB | 16 Q