3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { static function __callStatic($name, $arguments) { if ($name === 'get') { if (!isset($arguments[0])) { var_dump(['getSomeWhat']); var_dump($arguments); exit; } } echo 'OK'; } protected function get ($key) { // BUG!!! } } class Bar { static function __callStatic($name, $arguments) { echo Foo::get('getSomeWhat'); } } Bar::someUndefinedStaticFunction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ZQNJ
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   28     0  E >   INIT_STATIC_METHOD_CALL                                      'Bar', 'someUndefinedStaticFunction'
          1        DO_FCALL                                          0          
          2      > RETURN                                                       1

Class Foo:
Function __callstatic:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/4ZQNJ
function name:  __callStatic
number of ops:  17
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        IS_IDENTICAL                                                 !0, 'get'
          3      > JMPZ                                                         ~2, ->15
    7     4    >   ISSET_ISEMPTY_DIM_OBJ                             0  ~3      !1, 0
          5        BOOL_NOT                                             ~4      ~3
          6      > JMPZ                                                         ~4, ->15
    8     7    >   INIT_FCALL                                                   'var_dump'
          8        SEND_VAL                                                     <array>
          9        DO_ICALL                                                     
    9    10        INIT_FCALL                                                   'var_dump'
         11        SEND_VAR                                                     !1
         12        DO_ICALL                                                     
   10    13      > INIT_FCALL                                                   'exit'
         14*       DO_ICALL                                                     
   13    15    >   ECHO                                                         'OK'
   14    16      > RETURN                                                       null

End of function __callstatic

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ZQNJ
function name:  get
number of ops:  2
compiled vars:  !0 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
   18     1      > RETURN                                                       null

End of function get

End of class Foo.

Class Bar:
Function __callstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ZQNJ
function name:  __callStatic
number of ops:  7
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   24     2        INIT_STATIC_METHOD_CALL                                      'Foo', 'get'
          3        SEND_VAL_EX                                                  'getSomeWhat'
          4        DO_FCALL                                          0  $2      
          5        ECHO                                                         $2
   25     6      > RETURN                                                       null

End of function __callstatic

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.18 ms | 2119 KiB | 15 Q