3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public function __call($name, $arguments) { echo("i don't want to be in here :-("); } public static function __callStatic($name, $arguments) { echo('i want to be in here, but how?'); } public function instanceMethod() { // objective: call a non-existing static method, // so that eventually __callStatic is called and // can take care of things forward_static_call(['A', 'test']); } } (new A())->instanceMethod();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9kcSk
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   NEW                                                  $0      'A'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'instanceMethod'
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

Class A:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9kcSk
function name:  __call
number of ops:  4
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    5     2        ECHO                                                         'i+don%27t+want+to+be+in+here+%3A-%28'
    6     3      > 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/9kcSk
function name:  __callStatic
number of ops:  4
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    9     2        ECHO                                                         'i+want+to+be+in+here%2C+but+how%3F'
   10     3      > RETURN                                                       null

End of function __callstatic

Function instancemethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9kcSk
function name:  instanceMethod
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                                   'forward_static_call'
          1        SEND_VAL                                                     <array>
          2        DO_ICALL                                                     
   17     3      > RETURN                                                       null

End of function instancemethod

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.5 ms | 2796 KiB | 14 Q