On Tue, Apr 26, 2022 at 12:18 AM Larry Garfield <la...@garfieldtech.com>

> On Mon, Apr 25, 2022, at 4:07 PM, Rowan Tommins wrote:
> > Off the top of my head, I don't know what other inconsistencies remain,
> > but my point was that in every case so far, internal functions have been
> > adapted to match userland, not vice versa.
> <off topic>
> Internal functions error if you pass excessive arguments to a non-variadic
> function.  User-space functions just ignore the extras.  This is an
> inconsistency that has caused me considerable grief in the past year.
> I know Joe has said he wants userspace to become more strict like internal
> on this one.  I will not predict what actually happens.
> </off topic>


A few internal functions have parameters with an `UNKNOWN` default value in
the stubs, e.g.

     function get_class(object $object = UNKNOWN): string {}

documented with a question mark at

    get_class(object $object = ?): string


    function mt_rand(int $min = UNKNOWN, int $max = UNKNOWN): int {}

documented with two signatures at

    mt_rand(): int
    mt_rand(int $min, int $max): int


Guilliam Xavier

Reply via email to