3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach((new ReflectionMethod('DOMNamedNodeMap::getNamedItemNS'))->getParameters() as $parameter) { echo "Parameter name: "; var_dump($parameter->getName()); echo "It is optional: "; var_dump($parameter->isOptional()); if ($parameter->isDefaultValueAvailable()) { echo "Default Value available. It is: "; var_dump($parameter->getDefaultValue()); } else echo "Default value unavailable" . PHP_EOL; if ($parameter->allowsNull()){ echo "Allows null" . PHP_EOL;} }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 35
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 35
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 29
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 34
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 34
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 34
Branch analysis from position: 33
Branch analysis from position: 34
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/em9Kr
function name:  (null)
number of ops:  37
compiled vars:  !0 = $parameter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'DOMNamedNodeMap%3A%3AgetNamedItemNS'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $1, 'getParameters'
          4        DO_FCALL                                      0  $3      
          5      > FE_RESET_R                                       $4      $3, ->35
          6    > > FE_FETCH_R                                               $4, !0, ->35
    4     7    >   ECHO                                                     'Parameter+name%3A+'
    5     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'getName'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
    6    13        ECHO                                                     'It+is+optional%3A+'
    7    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !0, 'isOptional'
         16        DO_FCALL                                      0  $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                                 
    8    19        INIT_METHOD_CALL                                         !0, 'isDefaultValueAvailable'
         20        DO_FCALL                                      0  $9      
         21      > JMPZ                                                     $9, ->29
    9    22    >   ECHO                                                     'Default+Value+available.+It+is%3A+'
   10    23        INIT_FCALL                                               'var_dump'
         24        INIT_METHOD_CALL                                         !0, 'getDefaultValue'
         25        DO_FCALL                                      0  $10     
         26        SEND_VAR                                                 $10
         27        DO_ICALL                                                 
         28      > JMP                                                      ->30
   12    29    >   ECHO                                                     'Default+value+unavailable%0A'
   13    30    >   INIT_METHOD_CALL                                         !0, 'allowsNull'
         31        DO_FCALL                                      0  $12     
         32      > JMPZ                                                     $12, ->34
         33    >   ECHO                                                     'Allows+null%0A'
    3    34    > > JMP                                                      ->6
         35    >   FE_FREE                                                  $4
   14    36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.15 ms | 1400 KiB | 15 Q