3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ContainsStmts {} // BC break patch class_alias(ContainsStmts::class, StmtsAwareInterface::class); class SomeNode implements ContainsStmts {} $obj = new SomeNode(); // old should keep working var_dump($obj instanceof StmtsAwareInterface); // new var_dump($obj instanceof ContainsStmts);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6ivv3
function name:  (null)
number of ops:  17
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'class_alias'
          1        SEND_VAL                                                 'ContainsStmts'
          2        SEND_VAL                                                 'StmtsAwareInterface'
          3        DO_ICALL                                                 
    9     4        DECLARE_CLASS                                            'somenode'
   11     5        NEW                                              $2      'SomeNode'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
   14     8        INIT_FCALL                                               'var_dump'
          9        INSTANCEOF                                       ~5      !0, 'StmtsAwareInterface'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
   17    12        INIT_FCALL                                               'var_dump'
         13        INSTANCEOF                                       ~7      !0, 'ContainsStmts'
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class ContainsStmts: [no user functions]
Class SomeNode: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.91 ms | 1072 KiB | 15 Q