3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __destruct() { $r = new ReflectionClass($this); $this->test(); } public function test() { echo "Hi!"; } } $f = new foo; unset($f); //trigger destructor
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tujXE
function name:  (null)
number of ops:  5
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        UNSET_CV                                                 !0
          4      > RETURN                                                   1

Class foo:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tujXE
function name:  __destruct
number of ops:  8
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $1      'ReflectionClass'
          1        FETCH_THIS                                       $2      
          2        SEND_VAR_EX                                              $2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
    5     5        INIT_METHOD_CALL                                         'test'
          6        DO_FCALL                                      0          
    6     7      > RETURN                                                   null

End of function __destruct

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tujXE
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'Hi%21'
    9     1      > RETURN                                                   null

End of function test

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.59 ms | 1398 KiB | 13 Q