3v4l.org

run code in 500+ 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 recur_ksort(&$array) { foreach ($array as &$value) { if (is_array($value)) recur_ksort($value); } ksort($array); } recur_ksort($array); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xede5
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>
   25     1        INIT_FCALL                                                   'recur_ksort'
          2        SEND_REF                                                     !0
          3        DO_FCALL                                          0          
   26     4        INIT_FCALL                                                   'var_export'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                                     
          7      > RETURN                                                       1

Function recur_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/Xede5
function name:  recur_ksort
number of ops:  14
compiled vars:  !0 = $array, !1 = $value
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
          5    >   INIT_FCALL_BY_NAME                                           'recur_ksort'
          6        SEND_VAR_EX                                                  !1
          7        DO_FCALL                                          0          
   19     8    > > JMP                                                          ->2
          9    >   FE_FREE                                                      $2
   22    10        INIT_FCALL                                                   'ksort'
         11        SEND_REF                                                     !0
         12        DO_ICALL                                                     
   23    13      > RETURN                                                       null

End of function recur_ksort

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.63 ms | 3480 KiB | 16 Q