3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function doSomething() { return $this; } } class Proxy extends Base { public function doSomething() { return $this; } } class Proxy2 extends Base { public function doSomething() { return parent::doSomething(); } } $proxy = new Proxy(); $proxy2 = new Proxy2(); var_dump($proxy->doSomething()); var_dump($proxy2->doSomething());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cZOA
function name:  (null)
number of ops:  17
compiled vars:  !0 = $proxy, !1 = $proxy2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $2      'Proxy'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   25     3        NEW                                              $5      'Proxy2'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   26     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'doSomething'
          8        DO_FCALL                                      0  $8      
          9        SEND_VAR                                                 $8
         10        DO_ICALL                                                 
   27    11        INIT_FCALL                                               'var_dump'
         12        INIT_METHOD_CALL                                         !1, 'doSomething'
         13        DO_FCALL                                      0  $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class Base:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cZOA
function name:  doSomething
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_THIS                                       ~0      
          1      > RETURN                                                   ~0
    6     2*     > RETURN                                                   null

End of function dosomething

End of class Base.

Class Proxy:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cZOA
function name:  doSomething
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_THIS                                       ~0      
          1      > RETURN                                                   ~0
   13     2*     > RETURN                                                   null

End of function dosomething

End of class Proxy.

Class Proxy2:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cZOA
function name:  doSomething
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'doSomething'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
   20     3*     > RETURN                                                   null

End of function dosomething

End of class Proxy2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.11 ms | 1388 KiB | 15 Q