3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rc = new ReflectionClass('ArrayIterator'); foreach ($rc->getMethods() as $method) { if ($method->isAbstract() || $method->isStatic()) continue; foreach ($method->getParameters() as $param) { var_dump($method->name); foreach ($method->getParameters() as $param) { if ($param->isOptional()) var_dump([$param->name, $param->getDefaultValue()]); } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 44
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 44
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 42
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 42
Branch analysis from position: 20
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 40
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 40
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 39
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 39
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 40
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 42
Branch analysis from position: 14
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
filename:       /in/aVSjn
function name:  (null)
number of ops:  46
compiled vars:  !0 = $rc, !1 = $method, !2 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              'ArrayIterator'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    5     4        INIT_METHOD_CALL                                         !0, 'getMethods'
          5        DO_FCALL                                      0  $6      
          6      > FE_RESET_R                                       $7      $6, ->44
          7    > > FE_FETCH_R                                               $7, !1, ->44
    7     8    >   INIT_METHOD_CALL                                         !1, 'isAbstract'
          9        DO_FCALL                                      0  $8      
         10      > JMPNZ_EX                                         ~9      $8, ->14
         11    >   INIT_METHOD_CALL                                         !1, 'isStatic'
         12        DO_FCALL                                      0  $10     
         13        BOOL                                             ~9      $10
         14    > > JMPZ                                                     ~9, ->16
    8    15    > > JMP                                                      ->7
   10    16    >   INIT_METHOD_CALL                                         !1, 'getParameters'
         17        DO_FCALL                                      0  $11     
         18      > FE_RESET_R                                       $12     $11, ->42
         19    > > FE_FETCH_R                                               $12, !2, ->42
   12    20    >   INIT_FCALL                                               'var_dump'
         21        FETCH_OBJ_R                                      ~13     !1, 'name'
         22        SEND_VAL                                                 ~13
         23        DO_ICALL                                                 
   14    24        INIT_METHOD_CALL                                         !1, 'getParameters'
         25        DO_FCALL                                      0  $15     
         26      > FE_RESET_R                                       $16     $15, ->40
         27    > > FE_FETCH_R                                               $16, !2, ->40
   16    28    >   INIT_METHOD_CALL                                         !2, 'isOptional'
         29        DO_FCALL                                      0  $17     
         30      > JMPZ                                                     $17, ->39
   17    31    >   INIT_FCALL                                               'var_dump'
         32        FETCH_OBJ_R                                      ~18     !2, 'name'
         33        INIT_ARRAY                                       ~19     ~18
         34        INIT_METHOD_CALL                                         !2, 'getDefaultValue'
         35        DO_FCALL                                      0  $20     
         36        ADD_ARRAY_ELEMENT                                ~19     $20
         37        SEND_VAL                                                 ~19
         38        DO_ICALL                                                 
   14    39    > > JMP                                                      ->27
         40    >   FE_FREE                                                  $16
   10    41      > JMP                                                      ->19
         42    >   FE_FREE                                                  $12
    5    43      > JMP                                                      ->7
         44    >   FE_FREE                                                  $7
   20    45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.56 ms | 1400 KiB | 15 Q