3v4l.org

run code in 500+ 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); } } $h = new innocent_bystander(); $h->operation();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mtkR4
function name:  (null)
number of ops:  6
compiled vars:  !0 = $h
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   NEW                                                  $1      'innocent_bystander'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   15     3        INIT_METHOD_CALL                                             !0, 'operation'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Function horrible_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mtkR4
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/mtkR4
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

End of class innocent_bystander.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
177.29 ms | 2811 KiB | 14 Q