3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DbRepository { public function save($object) { } } class ExtendedDbRepository extends DbRepository { public function save($object) { } } class Foo { /** @var DbRepository */ var $repository; public function __construct(DbRepository $repository) { $this->repository = $repository; } } $foo = new Foo(new ExtendedDbRepository());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9DOh
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   NEW                                              $1      'Foo'
          1        NEW                                              $2      'ExtendedDbRepository'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
          6      > RETURN                                                   1

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

End of function save

End of class DbRepository.

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

End of function save

End of class ExtendedDbRepository.

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9DOh
function name:  __construct
number of ops:  4
compiled vars:  !0 = $repository
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   26     1        ASSIGN_OBJ                                               'repository'
          2        OP_DATA                                                  !0
   27     3      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.91 ms | 1398 KiB | 13 Q