3v4l.org

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

Class Foo:
Function dofoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZ7B9
function name:  doFoo
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function dofoo

End of class Foo.

Class Bar:
Function dofoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZ7B9
function name:  doFoo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'foo'
   11     1      > RETURN                                                   null

End of function dofoo

End of class Bar.

Class BarNoInterface:
Function dofoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZ7B9
function name:  doFoo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'foo'
   18     1      > RETURN                                                   null

End of function dofoo

End of class BarNoInterface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.62 ms | 940 KiB | 14 Q