3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface SetInterface { public function set($value); } class Foo implements SetInterface { public final function set($value) { echo 'Foo!'; } } class Bar extends Foo { public function set($value) { echo 'Bar'; } } $foo = new Foo; $bar = new Bar; $foo->set(42); $bar->set(42);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/urnWI
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'foo'
   16     1        DECLARE_CLASS                                            'bar', 'foo'
   24     2        NEW                                              $2      'Foo'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   25     5        NEW                                              $5      'Bar'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   27     8        INIT_METHOD_CALL                                         !0, 'set'
          9        SEND_VAL_EX                                              42
         10        DO_FCALL                                      0          
   28    11        INIT_METHOD_CALL                                         !1, 'set'
         12        SEND_VAL_EX                                              42
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Class SetInterface:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/urnWI
function name:  set
number of ops:  2
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function set

End of class SetInterface.

Class Foo:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/urnWI
function name:  set
number of ops:  3
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ECHO                                                     'Foo%21'
   13     2      > RETURN                                                   null

End of function set

End of class Foo.

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

End of function set

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.2 ms | 1443 KiB | 13 Q