3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myarray = array("level1" => array("level2" => array("level3" => "value"))); function test(){ global $myarray; $myarray =& $myarray["level1"]; print_r($myarray); //returns "Array ( [level2] => Array ( [level3] => value ) )" } test(); echo "<br>"; print_r($myarray); //returns "Array ( [level1] => Array ( [level2] => Array ( [level3] => value ) ) )"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uAQCF
function name:  (null)
number of ops:  8
compiled vars:  !0 = $myarray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'test'
          2        DO_FCALL                                      0          
   13     3        ECHO                                                     '%3Cbr%3E'
   15     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uAQCF
function name:  test
number of ops:  7
compiled vars:  !0 = $myarray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'myarray'
    7     1        FETCH_DIM_W                                      $1      !0, 'level1'
          2        ASSIGN_REF                                               !0, $1
    8     3        INIT_FCALL                                               'print_r'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    9     6      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.61 ms | 1397 KiB | 16 Q