3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { protected function f() { return 'f'; } public function __call($method, $args) { return call_user_func_array([$this, $method], $args); } public static function __callStatic($method, $args) { $me = new static; return call_user_func_array([$me, $method], $args); } } echo C::f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FAtuf
function name:  (null)
number of ops:  4
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  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

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

End of function f

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FAtuf
function name:  __call
number of ops:  11
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        FETCH_THIS                                       ~2      
          3        INIT_ARRAY                                       ~3      ~2
          4        ADD_ARRAY_ELEMENT                                ~3      !0
          5        INIT_USER_CALL                                0          'call_user_func_array', ~3
          6        SEND_ARRAY                                               !1
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      0  $4      
          9      > RETURN                                                   $4
    6    10*     > RETURN                                                   null

End of function __call

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

End of function __callstatic

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.59 ms | 1395 KiB | 13 Q