3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ref = new ReflectionFunction('array_unique'); var_dump($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/hSGnE
function name:  (null)
number of ops:  20
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        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
    6     9        NEW                                              $6      'ReflectionFunction'
         10        SEND_VAL_EX                                              'array_search'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !0, $6
    7    13        INIT_FCALL                                               'var_dump'
         14        INIT_METHOD_CALL                                         !0, 'getParameters'
         15        DO_FCALL                                      0  $9      
         16        COUNT                                            ~10     $9
         17        SEND_VAL                                                 ~10
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.87 ms | 1395 KiB | 15 Q