3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CC { private static $bt; public function run(&$a) { self::$bt[] = debug_backtrace(); $a = 222; } } function n(&$a) { (new CC())->run($a); } $a = [ 'a' => 1, 'b' => 2, 'c' => 3 ]; n($a['b']); echo '<pre>'; var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZLToT
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, <array>
   25     1        INIT_FCALL                                               'n'
          2        FETCH_DIM_W                                      $2      !0, 'b'
          3        SEND_REF                                                 $2
          4        DO_FCALL                                      0          
   26     5        ECHO                                                     '%3Cpre%3E'
   27     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function n:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZLToT
function name:  n
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        NEW                                              $1      'CC'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $1, 'run'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   17     6      > RETURN                                                   null

End of function n

Class CC:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZLToT
function name:  run
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'debug_backtrace'
          2        DO_ICALL                                         $3      
          3        FETCH_STATIC_PROP_W          global              $1      'bt'
          4        ASSIGN_DIM                                               $1
          5        OP_DATA                                                  $3
   10     6        ASSIGN                                                   !0, 222
   11     7      > RETURN                                                   null

End of function run

End of class CC.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.39 ms | 1403 KiB | 18 Q