3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { public function foo(); } class C implements I { public function foo() {echo __CLASS__;} } var_dump (new C instanceof I); $c = new C; $c::foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pILGA
function name:  (null)
number of ops:  14
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'c'
   11     1        INIT_FCALL                                               'var_dump'
          2        NEW                                              $1      'C'
          3        DO_FCALL                                      0          
          4        INSTANCEOF                                       ~3      $1, 'I'
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                                 
   12     7        NEW                                              $5      'C'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $5
   13    10        FETCH_CLASS                                   0  $8      !0
         11        INIT_STATIC_METHOD_CALL                                  $8, 'foo'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

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

End of function foo

End of class I.

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

End of function foo

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.53 ms | 1395 KiB | 15 Q