3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ function A(){ $this->a['s'] = 'hoge'; } function B(){ $s =& $this->a['s']; $this->o($s); var_dump($s); } function o($s){ $s = 'da' . $s; } } $a = new A(); $a->B(); var_dump($a->a['s']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/korqt
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'B'
          4        DO_FCALL                                      0          
   17     5        INIT_FCALL                                               'var_dump'
          6        FETCH_OBJ_R                                      ~5      !0, 'a'
          7        FETCH_DIM_R                                      ~6      ~5, 's'
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class A:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/korqt
function name:  A
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_OBJ_W                                      $0      'a'
          1        ASSIGN_DIM                                               $0, 's'
          2        OP_DATA                                                  'hoge'
    5     3      > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/korqt
function name:  B
number of ops:  10
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_W                                      $1      'a'
          1        FETCH_DIM_W                                      $2      $1, 's'
          2        ASSIGN_REF                                               !0, $2
    8     3        INIT_METHOD_CALL                                         'o'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
    9     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   10     9      > RETURN                                                   null

End of function b

Function o:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/korqt
function name:  o
number of ops:  4
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        CONCAT                                           ~1      'da', !0
          2        ASSIGN                                                   !0, ~1
   13     3      > RETURN                                                   null

End of function o

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.2 ms | 1396 KiB | 15 Q