3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Func { public static function __callStatic($name, $arguments) { if (!function_exists($name)) { // include } return call_user_func_array($name, $arguments); } } Func::foo('bar'); Func::{'foo\\bar'}('qux');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KEAci
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'Func', 'foo'
          1        SEND_VAL_EX                                              'bar'
          2        DO_FCALL                                      0          
   16     3        INIT_STATIC_METHOD_CALL                                  'Func', 'foo%5Cbar'
          4        SEND_VAL_EX                                              'qux'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Func:
Function __callstatic:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/KEAci
function name:  __callStatic
number of ops:  13
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'function_exists'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        BOOL_NOT                                         ~3      $2
          6      > JMPZ                                                     ~3, ->7
    9     7    >   INIT_USER_CALL                                0          'call_user_func_array', !0
          8        SEND_ARRAY                                               !1
          9        CHECK_UNDEF_ARGS                                         
         10        DO_FCALL                                      0  $4      
         11      > RETURN                                                   $4
   10    12*     > RETURN                                                   null

End of function __callstatic

End of class Func.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.53 ms | 1395 KiB | 15 Q