3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = Collator::class; $rc = new ReflectionClass($c); foreach ($rc->getMethods(ReflectionMethod::IS_PUBLIC) as $rm) { printf("- %s::%s:\n%d\n%d\n", $c, $rm->getName(), $rm->getNumberOfParameters(), $rm->getNumberOfRequiredParameters()); foreach ($rm->getParameters() as $param) { printf("Parameter #%d (%s) %s OPTIONAL\n", $param->getPosition(), $param->getName(), $param->isOptional() ? "IS" : "IS NOT"); } echo PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 47
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 47
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 44
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 44
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 44
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
filename:       /in/kpoqa
function name:  (null)
number of ops:  49
compiled vars:  !0 = $c, !1 = $rc, !2 = $rm, !3 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Collator'
    3     1        NEW                                              $5      'ReflectionClass'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
    4     5        INIT_METHOD_CALL                                         !1, 'getMethods'
          6        SEND_VAL_EX                                              1
          7        DO_FCALL                                      0  $8      
          8      > FE_RESET_R                                       $9      $8, ->47
          9    > > FE_FETCH_R                                               $9, !2, ->47
    5    10    >   INIT_FCALL                                               'printf'
         11        SEND_VAL                                                 '-+%25s%3A%3A%25s%3A%0A%25d%0A%25d%0A'
         12        SEND_VAR                                                 !0
         13        INIT_METHOD_CALL                                         !2, 'getName'
         14        DO_FCALL                                      0  $10     
         15        SEND_VAR                                                 $10
         16        INIT_METHOD_CALL                                         !2, 'getNumberOfParameters'
         17        DO_FCALL                                      0  $11     
         18        SEND_VAR                                                 $11
         19        INIT_METHOD_CALL                                         !2, 'getNumberOfRequiredParameters'
         20        DO_FCALL                                      0  $12     
         21        SEND_VAR                                                 $12
         22        DO_ICALL                                                 
    6    23        INIT_METHOD_CALL                                         !2, 'getParameters'
         24        DO_FCALL                                      0  $14     
         25      > FE_RESET_R                                       $15     $14, ->44
         26    > > FE_FETCH_R                                               $15, !3, ->44
    7    27    >   INIT_FCALL                                               'printf'
         28        SEND_VAL                                                 'Parameter+%23%25d+%28%25s%29+%25s+OPTIONAL%0A'
         29        INIT_METHOD_CALL                                         !3, 'getPosition'
         30        DO_FCALL                                      0  $16     
         31        SEND_VAR                                                 $16
         32        INIT_METHOD_CALL                                         !3, 'getName'
         33        DO_FCALL                                      0  $17     
         34        SEND_VAR                                                 $17
         35        INIT_METHOD_CALL                                         !3, 'isOptional'
         36        DO_FCALL                                      0  $18     
         37      > JMPZ                                                     $18, ->40
         38    >   QM_ASSIGN                                        ~19     'IS'
         39      > JMP                                                      ->41
         40    >   QM_ASSIGN                                        ~19     'IS+NOT'
         41    >   SEND_VAL                                                 ~19
         42        DO_ICALL                                                 
    6    43      > JMP                                                      ->26
         44    >   FE_FREE                                                  $15
    9    45        ECHO                                                     '%0A'
    4    46      > JMP                                                      ->9
         47    >   FE_FREE                                                  $9
   10    48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.56 ms | 1392 KiB | 15 Q