3v4l.org

run code in 500+ PHP versions simultaneously
<?php $refFunc = new \ReflectionFunction('get_defined_functions'); var_dump($refFunc->getNumberOfRequiredParameters()); foreach ($refFunc->getParameters() as $parameter) { var_dump(sprintf('Parameter: "%s"; optional: %s', $parameter->name, var_export($parameter->isOptional(), true))); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 28
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 28
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/pRaFj
function name:  (null)
number of ops:  30
compiled vars:  !0 = $refFunc, !1 = $parameter
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $2      'ReflectionFunction'
          1        SEND_VAL_EX                                                  'get_defined_functions'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $2
    4     4        INIT_FCALL                                                   'var_dump'
          5        INIT_METHOD_CALL                                             !0, 'getNumberOfRequiredParameters'
          6        DO_FCALL                                          0  $5      
          7        SEND_VAR                                                     $5
          8        DO_ICALL                                                     
    5     9        INIT_METHOD_CALL                                             !0, 'getParameters'
         10        DO_FCALL                                          0  $7      
         11      > FE_RESET_R                                           $8      $7, ->28
         12    > > FE_FETCH_R                                                   $8, !1, ->28
    6    13    >   INIT_FCALL                                                   'var_dump'
         14        FETCH_OBJ_R                                          ~9      !1, 'name'
         15        INIT_FCALL                                                   'var_export'
         16        INIT_METHOD_CALL                                             !1, 'isOptional'
         17        DO_FCALL                                          0  $10     
         18        SEND_VAR                                                     $10
         19        SEND_VAL                                                     <true>
         20        DO_ICALL                                             $11     
         21        ROPE_INIT                                         4  ~13     'Parameter%3A+%22'
         22        ROPE_ADD                                          1  ~13     ~13, ~9
         23        ROPE_ADD                                          2  ~13     ~13, '%22%3B+optional%3A+'
         24        ROPE_END                                          3  ~12     ~13, $11
         25        SEND_VAL                                                     ~12
         26        DO_ICALL                                                     
    5    27      > JMP                                                          ->12
         28    >   FE_FREE                                                      $8
    7    29      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
183.24 ms | 2926 KiB | 15 Q