3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IA {} class IB implements IA {} abstract class A { public function __construct(IA $ia) { echo "works!"; } } class B extends A { public function __construct(IB $ib) { parent::__construct($ib); } } $b = new B(new IA());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PLC16
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'ib'
   17     1        NEW                                              $1      'B'
          2        NEW                                              $2      'IA'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $2
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
          7      > RETURN                                                   1

Class IA: [no user functions]
Class IB: [no user functions]
Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PLC16
function name:  __construct
number of ops:  3
compiled vars:  !0 = $ia
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ECHO                                                     'works%21'
    9     2      > RETURN                                                   null

End of function __construct

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PLC16
function name:  __construct
number of ops:  5
compiled vars:  !0 = $ib
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   14     4      > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.49 ms | 1394 KiB | 13 Q