3v4l.org

run code in 300+ PHP versions simultaneously
<?php function testfunc($testString,$testArray) { // doesn't matter } $ReflectionFunction = new \ReflectionFunction('testfunc'); $params = $ReflectionFunction->getParameters(); $paramNames = array_map(fn($item) => $item->getName(), $params); echo "\"\${$paramNames[0]}\", \"\${$paramNames[1]}\"";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oY24M
function name:  (null)
number of ops:  22
compiled vars:  !0 = $ReflectionFunction, !1 = $params, !2 = $paramNames
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $3      'ReflectionFunction'
          1        SEND_VAL_EX                                              'testfunc'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   10     4        INIT_METHOD_CALL                                         !0, 'getParameters'
          5        DO_FCALL                                      0  $6      
          6        ASSIGN                                                   !1, $6
   11     7        INIT_FCALL                                               'array_map'
          8        DECLARE_LAMBDA_FUNCTION                          ~8      [0]
          9        SEND_VAL                                                 ~8
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
   13    13        ROPE_INIT                                     5  ~14     '%22%24'
         14        FETCH_DIM_R                                      ~11     !2, 0
         15        ROPE_ADD                                      1  ~14     ~14, ~11
         16        ROPE_ADD                                      2  ~14     ~14, '%22%2C+%22%24'
         17        FETCH_DIM_R                                      ~12     !2, 1
         18        ROPE_ADD                                      3  ~14     ~14, ~12
         19        ROPE_END                                      4  ~13     ~14, '%22'
         20        ECHO                                                     ~13
         21      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oY24M
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        INIT_METHOD_CALL                                         !0, 'getName'
          2        DO_FCALL                                      0  $1      
          3      > RETURN                                                   $1
          4*     > RETURN                                                   null

End of Dynamic Function 0

Function testfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oY24M
function name:  testfunc
number of ops:  3
compiled vars:  !0 = $testString, !1 = $testArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2      > RETURN                                                   null

End of function testfunc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.96 ms | 1011 KiB | 14 Q