3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public static function stuff(); } class Bar implements Foo { public static function stuff() { return "Hello World!\n"; } } echo Bar::stuff(); $bar = new Bar; echo $bar->stuff();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1f1o6
function name:  (null)
number of ops:  11
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'bar'
   16     1        INIT_STATIC_METHOD_CALL                                  'Bar', 'stuff'
          2        DO_FCALL                                      0  $1      
          3        ECHO                                                     $1
   17     4        NEW                                              $2      'Bar'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   18     7        INIT_METHOD_CALL                                         !0, 'stuff'
          8        DO_FCALL                                      0  $5      
          9        ECHO                                                     $5
         10      > RETURN                                                   1

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

End of function stuff

End of class Foo.

Class Bar:
Function stuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1f1o6
function name:  stuff
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   'Hello+World%21%0A'
   13     1*     > RETURN                                                   null

End of function stuff

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.95 ms | 1394 KiB | 13 Q