3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach ((new ReflectionClass('PDO'))->getConstructor()->getParameters() as $parameter) { echo vsprintf("%-10s optional: %-10s default value: %s" . PHP_EOL, [ $parameter->getName(), $parameter->isOptional() ? 'yeop' : 'nope', $parameter->isDefaultValueAvailable() ? 'yeop' : 'nope', ]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 32
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 32
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
Branch analysis from position: 26
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/GkE3O
function name:  (null)
number of ops:  34
compiled vars:  !0 = $parameter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'ReflectionClass'
          1        SEND_VAL_EX                                              'PDO'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $1, 'getConstructor'
          4        DO_FCALL                                      0  $3      
          5        INIT_METHOD_CALL                                         $3, 'getParameters'
          6        DO_FCALL                                      0  $4      
          7      > FE_RESET_R                                       $5      $4, ->32
          8    > > FE_FETCH_R                                               $5, !0, ->32
    4     9    >   INIT_FCALL                                               'vsprintf'
         10        SEND_VAL                                                 '%25-10s+optional%3A+%25-10s+default+value%3A+%25s%0A'
    5    11        INIT_METHOD_CALL                                         !0, 'getName'
         12        DO_FCALL                                      0  $6      
         13        INIT_ARRAY                                       ~7      $6
    6    14        INIT_METHOD_CALL                                         !0, 'isOptional'
         15        DO_FCALL                                      0  $8      
         16      > JMPZ                                                     $8, ->19
         17    >   QM_ASSIGN                                        ~9      'yeop'
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~9      'nope'
         20    >   ADD_ARRAY_ELEMENT                                ~7      ~9
    7    21        INIT_METHOD_CALL                                         !0, 'isDefaultValueAvailable'
         22        DO_FCALL                                      0  $10     
         23      > JMPZ                                                     $10, ->26
         24    >   QM_ASSIGN                                        ~11     'yeop'
         25      > JMP                                                      ->27
         26    >   QM_ASSIGN                                        ~11     'nope'
         27    >   ADD_ARRAY_ELEMENT                                ~7      ~11
         28        SEND_VAL                                                 ~7
         29        DO_ICALL                                         $12     
         30        ECHO                                                     $12
    3    31      > JMP                                                      ->8
         32    >   FE_FREE                                                  $5
    9    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.19 ms | 1400 KiB | 15 Q