3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IFoo { public function bar(); } class Foo { public function bar() { echo 'hier'; } } class FooAdapter implements IFoo { protected $foo; public function __construct() { $this->foo = new Foo(); } public function bar() { $this->foo->bar(); } } $foo = new FooAdapter(); $foo->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/328aW
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   DECLARE_CLASS                                            'fooadapter'
   31     1        NEW                                              $1      'FooAdapter'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   32     4        INIT_METHOD_CALL                                         !0, 'bar'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function bar

End of class IFoo.

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

End of function bar

End of class Foo.

Class FooAdapter:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/328aW
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'foo'
          3        OP_DATA                                                  $1
   23     4      > RETURN                                                   null

End of function __construct

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/328aW
function name:  bar
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1        INIT_METHOD_CALL                                         ~0, 'bar'
          2        DO_FCALL                                      0          
   28     3      > RETURN                                                   null

End of function bar

End of class FooAdapter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.2 ms | 1395 KiB | 13 Q