3v4l.org

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

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

End of function func1

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

End of function func2

Class Hoge:
Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ve39
function name:  test1
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL_BY_NAME                                       'func1'
          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 test1

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

End of function test2

End of class Hoge.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.45 ms | 1400 KiB | 15 Q