3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface A {} interface B {} class NeedsA { function __construct(A $a) {} } class NeedsB extends NeedsA { function __construct(B $b) {} } var_dump(new NeedsB(new class implements B {}));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hGPu0
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                                   'var_dump'
          1        NEW                                                  $0      'NeedsB'
          2        DECLARE_ANON_CLASS                                   <unknown> 
          3        NEW                                                  $2      $1
          4        DO_FCALL                                          0          
          5        SEND_VAR_NO_REF_EX                                           $2
          6        DO_FCALL                                          0          
          7        SEND_VAR                                                     $0
          8        DO_ICALL                                                     
          9      > RETURN                                                       1

Class A: [no user functions]
Class B: [no user functions]
Class NeedsA:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hGPu0
function name:  __construct
number of ops:  2
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function __construct

End of class NeedsA.

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

End of function __construct

End of class NeedsB.

Class B@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
209.2 ms | 1794 KiB | 14 Q