3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rm = new ReflectionMethod(Collator::class, 'getSortKey'); var_dump($rm->getNumberOfParameters()); var_dump($rm->getNumberOfRequiredParameters()); $rf = new ReflectionFunction('collator_get_sort_key'); var_dump($rf->getNumberOfParameters()); var_dump($rf->getNumberOfRequiredParameters());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hurjo
function name:  (null)
number of ops:  30
compiled vars:  !0 = $rm, !1 = $rf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'ReflectionMethod'
          1        SEND_VAL_EX                                              'Collator'
          2        SEND_VAL_EX                                              'getSortKey'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    5     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'getNumberOfParameters'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
    6    10        INIT_FCALL                                               'var_dump'
         11        INIT_METHOD_CALL                                         !0, 'getNumberOfRequiredParameters'
         12        DO_FCALL                                      0  $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
    8    15        NEW                                              $9      'ReflectionFunction'
         16        SEND_VAL_EX                                              'collator_get_sort_key'
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !1, $9
    9    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !1, 'getNumberOfParameters'
         21        DO_FCALL                                      0  $12     
         22        SEND_VAR                                                 $12
         23        DO_ICALL                                                 
   10    24        INIT_FCALL                                               'var_dump'
         25        INIT_METHOD_CALL                                         !1, 'getNumberOfRequiredParameters'
         26        DO_FCALL                                      0  $14     
         27        SEND_VAR                                                 $14
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.68 ms | 1395 KiB | 15 Q