3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { public function foo(); } class C implements I { public function foo() {echo __CLASS__;} public static function s() {echo __CLASS__;} } var_dump (new C instanceof I); $c = new C; $c::c();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sAsTP
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'
   12     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                                                 
   13     7        NEW                                              $5      'C'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $5
   14    10        FETCH_CLASS                                   0  $8      !0
         11        INIT_STATIC_METHOD_CALL                                  $8, 'c'
         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/sAsTP
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/sAsTP
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

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

End of function s

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.31 ms | 1396 KiB | 15 Q