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; echo "In callStatic\n"; return call_user_func_array(array($o, $method), $params); } } C::f(); C::x();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j07Hd
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_STATIC_METHOD_CALL                                  'C', 'f'
          1        DO_FCALL                                      0          
   14     2        INIT_STATIC_METHOD_CALL                                  'C', 'x'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j07Hd
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/j07Hd
function name:  __callStatic
number of ops:  14
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        ECHO                                                     'In+callStatic%0A'
    9     6        INIT_ARRAY                                       ~6      !2
          7        ADD_ARRAY_ELEMENT                                ~6      !0
          8        INIT_USER_CALL                                0          'call_user_func_array', ~6
          9        SEND_ARRAY                                               !1
         10        CHECK_UNDEF_ARGS                                         
         11        DO_FCALL                                      0  $7      
         12      > RETURN                                                   $7
   10    13*     > RETURN                                                   null

End of function __callstatic

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.82 ms | 1394 KiB | 13 Q