3v4l.org

run code in 300+ PHP versions simultaneously
<?php function horrible_function(&$o) { $o = (object)array('haha' => 'got you'); } class innocent_bystander { function operation() { horrible_function($this); var_dump($this); } function test() { var_dump($this); } } $h = new innocent_bystander(); $h->operation(); $h->test(); var_dump($h);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mFSeh
function name:  (null)
number of ops:  11
compiled vars:  !0 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'innocent_bystander'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'operation'
          4        DO_FCALL                                      0          
   19     5        INIT_METHOD_CALL                                         !0, 'test'
          6        DO_FCALL                                      0          
   20     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function horrible_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mFSeh
function name:  horrible_function
number of ops:  4
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        CAST                                          8  ~1      <array>
          2        ASSIGN                                                   !0, ~1
    5     3      > RETURN                                                   null

End of function horrible_function

Class innocent_bystander:
Function operation:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mFSeh
function name:  operation
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'horrible_function'
          1        FETCH_THIS                                       $0      
          2        SEND_REF                                                 $0
          3        DO_FCALL                                      0          
   10     4        INIT_FCALL                                               'var_dump'
          5        FETCH_THIS                                       ~2      
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   11     8      > RETURN                                                   null

End of function operation

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mFSeh
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   null

End of function test

End of class innocent_bystander.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.04 ms | 1399 KiB | 16 Q