3v4l.org

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

Function func:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jngb4
function name:  func
number of ops:  3
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        ASSIGN                                                   !0, null
   15     2      > RETURN                                                   null

End of function func

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

End of function test

End of class Hoge.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.81 ms | 1395 KiB | 15 Q