3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { function baz($moo); } abstract class Bar implements Foo {} class_alias('Bar', 'Bar53'); eval('abstract class Bar52 extends Bar {}'); class Test53 extends Bar53 { function baz($moo) {} } class Test52 extends Bar52 { function baz($moo) {} } var_dump(new Test52() instanceof Foo); var_dump(new Test53() instanceof Foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EXfLf
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'bar'
    7     1        INIT_FCALL                                               'class_alias'
          2        SEND_VAL                                                 'Bar'
          3        SEND_VAL                                                 'Bar53'
          4        DO_ICALL                                                 
    8     5        INCLUDE_OR_EVAL                                          'abstract+class+Bar52+extends+Bar+%7B%7D', EVAL
   10     6        DECLARE_CLASS                                            'test53', 'bar53'
   11     7        DECLARE_CLASS                                            'test52', 'bar52'
   13     8        INIT_FCALL                                               'var_dump'
          9        NEW                                              $2      'Test52'
         10        DO_FCALL                                      0          
         11        INSTANCEOF                                       ~4      $2, 'Foo'
         12        SEND_VAL                                                 ~4
         13        DO_ICALL                                                 
   14    14        INIT_FCALL                                               'var_dump'
         15        NEW                                              $6      'Test53'
         16        DO_FCALL                                      0          
         17        INSTANCEOF                                       ~8      $6, 'Foo'
         18        SEND_VAL                                                 ~8
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

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

End of function baz

End of class Foo.

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

End of function baz

End of class Test53.

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

End of function baz

End of class Test52.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.14 ms | 1388 KiB | 17 Q