3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function f() { return 'foo'; } public static function __callStatic($method, $params) { $o = new static; return call_user_func_args(array($o, $method), $params); } } C::f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lIA4o
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'C', 'f'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

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

End of function f

Function __callstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lIA4o
function name:  __callStatic
number of ops:  13
compiled vars:  !0 = $method, !1 = $params, !2 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        NEW                          static              $3      
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $3
    8     5        INIT_FCALL_BY_NAME                                       'call_user_func_args'
          6        INIT_ARRAY                                       ~6      !2
          7        ADD_ARRAY_ELEMENT                                ~6      !0
          8        SEND_VAL_EX                                              ~6
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $7      
         11      > RETURN                                                   $7
    9    12*     > RETURN                                                   null

End of function __callstatic

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.7 ms | 1394 KiB | 13 Q