3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ParentMapperInterface { } interface ChildMapperInterface extends ParentMapperInterface { } class ChildMapper implements ChildMapperInterface { } class ParentClass { protected ParentMapperInterface $mapper; public function __construct(ParentMapperInterface $mapper) { $this->mapper = $mapper; } } class ChildClass extends ParentClass { protected int $other; public function __construct(ChildMapperInterface $mapper, int $other) { parent::__construct($mapper); $this->other = $other; } } $obj = new ChildClass(new ChildMapper(), 0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4AGfp
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'childmapperinterface'
   10     1        DECLARE_CLASS                                            'childmapper'
   36     2        NEW                                              $1      'ChildClass'
          3        NEW                                              $2      'ChildMapper'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        SEND_VAL_EX                                              0
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $1
          9      > RETURN                                                   1

Class ParentMapperInterface: [no user functions]
Class ChildMapperInterface: [no user functions]
Class ChildMapper: [no user functions]
Class ParentClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4AGfp
function name:  __construct
number of ops:  4
compiled vars:  !0 = $mapper
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        ASSIGN_OBJ                                               'mapper'
          2        OP_DATA                                                  !0
   21     3      > RETURN                                                   null

End of function __construct

End of class ParentClass.

Class ChildClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4AGfp
function name:  __construct
number of ops:  8
compiled vars:  !0 = $mapper, !1 = $other
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   31     2        INIT_STATIC_METHOD_CALL                                  
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
   32     5        ASSIGN_OBJ                                               'other'
          6        OP_DATA                                                  !1
   33     7      > RETURN                                                   null

End of function __construct

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.65 ms | 1008 KiB | 13 Q