3v4l.org

run code in 300+ 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 = 29
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 29
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/pRaFj
function name:  (null)
number of ops:  31
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, ->29
         12    > > FE_FETCH_R                                               $8, !1, ->29
    6    13    >   INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'sprintf'
         15        SEND_VAL                                                 'Parameter%3A+%22%25s%22%3B+optional%3A+%25s'
         16        FETCH_OBJ_R                                      ~9      !1, 'name'
         17        SEND_VAL                                                 ~9
         18        INIT_FCALL                                               'var_export'
         19        INIT_METHOD_CALL                                         !1, 'isOptional'
         20        DO_FCALL                                      0  $10     
         21        SEND_VAR                                                 $10
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $11     
         24        SEND_VAR                                                 $11
         25        DO_ICALL                                         $12     
         26        SEND_VAR                                                 $12
         27        DO_ICALL                                                 
    5    28      > JMP                                                      ->12
         29    >   FE_FREE                                                  $8
    7    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.49 ms | 1396 KiB | 19 Q