3v4l.org

run code in 300+ PHP versions simultaneously
<?php class item { public static function static_call() { echo "Works!"; } } $classname = 'item'; $item = new item(); // 3 ways to call it. item::static_call(); $classname::static_call(); $item::static_call();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I11ga
function name:  (null)
number of ops:  13
compiled vars:  !0 = $classname, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'item'
    9     1        NEW                                              $3      'item'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   12     4        INIT_STATIC_METHOD_CALL                                  'item', 'static_call'
          5        DO_FCALL                                      0          
   13     6        FETCH_CLASS                                   0  $7      !0
          7        INIT_STATIC_METHOD_CALL                                  $7, 'static_call'
          8        DO_FCALL                                      0          
   14     9        FETCH_CLASS                                   0  $9      !1
         10        INIT_STATIC_METHOD_CALL                                  $9, 'static_call'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

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

End of function static_call

End of class item.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.42 ms | 1393 KiB | 13 Q