3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ''; initArray($array); initArray($array['a']); $array['a']['b'] = 1; function initArray(&$node) { if ($node === '') { $node = array(); } } var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TcAI0
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        INIT_FCALL_BY_NAME                                       'initArray'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    5     4        INIT_FCALL_BY_NAME                                       'initArray'
          5        CHECK_FUNC_ARG                                           
          6        FETCH_DIM_FUNC_ARG                               $3      !0, 'a'
          7        SEND_FUNC_ARG                                            $3
          8        DO_FCALL                                      0          
    6     9        FETCH_DIM_W                                      $5      !0, 'a'
         10        ASSIGN_DIM                                               $5, 'b'
         11        OP_DATA                                                  1
   14    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function initarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/TcAI0
function name:  initArray
number of ops:  5
compiled vars:  !0 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        IS_IDENTICAL                                             !0, ''
          2      > JMPZ                                                     ~1, ->4
   10     3    >   ASSIGN                                                   !0, <array>
   12     4    > > RETURN                                                   null

End of function initarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.71 ms | 1436 KiB | 14 Q