3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function f() { echo "In f\n"; } public static function __callStatic($method, $params) { echo "Calling static method {$method} with parameters: " . implode(", ", $params) . "\n"; $o = new static; return call_user_func_array(array($o, $method), $params); } public function x() { echo "In X\n"; } } C::f(); C::x();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KtidY
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_STATIC_METHOD_CALL                                  'C', 'f'
          1        DO_FCALL                                      0          
   17     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/KtidY
function name:  f
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'In+f%0A'
    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/KtidY
function name:  __callStatic
number of ops:  23
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        ROPE_INIT                                     3  ~4      'Calling+static+method+'
          3        ROPE_ADD                                      1  ~4      ~4, !0
          4        ROPE_END                                      2  ~3      ~4, '+with+parameters%3A+'
          5        INIT_FCALL                                               'implode'
          6        SEND_VAL                                                 '%2C+'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        CONCAT                                           ~7      ~3, $6
         10        CONCAT                                           ~8      ~7, '%0A'
         11        ECHO                                                     ~8
    8    12        NEW                          static              $9      
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $9
    9    15        INIT_ARRAY                                       ~12     !2
         16        ADD_ARRAY_ELEMENT                                ~12     !0
         17        INIT_USER_CALL                                0          'call_user_func_array', ~12
         18        SEND_ARRAY                                               !1
         19        CHECK_UNDEF_ARGS                                         
         20        DO_FCALL                                      0  $13     
         21      > RETURN                                                   $13
   10    22*     > RETURN                                                   null

End of function __callstatic

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KtidY
function name:  x
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'In+X%0A'
   13     1      > RETURN                                                   null

End of function x

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.19 ms | 1400 KiB | 15 Q