3v4l.org

run code in 500+ PHP versions simultaneously
<?php $ref = new ReflectionFunction('array_unique'); var_dump(count($ref->getParameters())); // outputs "1" in the PHP runtime $ref = new ReflectionFunction('array_search'); var_dump(count($ref->getParameters())); // always outputs "3"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tj5cj
function name:  (null)
number of ops:  21
compiled vars:  !0 = $ref
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $1      'ReflectionFunction'
          1        SEND_VAL_EX                                                  'array_unique'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
    4     4        INIT_FCALL                                                   'var_dump'
          5        INIT_METHOD_CALL                                             !0, 'getParameters'
          6        DO_FCALL                                          0  $4      
          7        COUNT                                                ~5      $4
          8        SEND_VAL                                                     ~5
          9        DO_ICALL                                                     
    6    10        NEW                                                  $7      'ReflectionFunction'
         11        SEND_VAL_EX                                                  'array_search'
         12        DO_FCALL                                          0          
         13        ASSIGN                                                       !0, $7
    7    14        INIT_FCALL                                                   'var_dump'
         15        INIT_METHOD_CALL                                             !0, 'getParameters'
         16        DO_FCALL                                          0  $10     
         17        COUNT                                                ~11     $10
         18        SEND_VAL                                                     ~11
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.46 ms | 3071 KiB | 14 Q