3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I{ public function i(); } class C implements I { public function i() { echo __CLASS__; } } class D { public function __construct(I $c) { echo __CLASS__; } } new D(new C);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/agPvC
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'c'
   22     1        NEW                                              $0      'D'
          2        NEW                                              $1      'C'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $1
          5        DO_FCALL                                      0          
          6        FREE                                                     $0
          7      > RETURN                                                   1

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

End of function i

End of class I.

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

End of function i

End of class C.

Class D:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/agPvC
function name:  __construct
number of ops:  3
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        ECHO                                                     'D'
   18     2      > RETURN                                                   null

End of function __construct

End of class D.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.27 ms | 1398 KiB | 13 Q