Skip to content

func_get_args() don't work with named argument #21940

@ProtocolLive

Description

@ProtocolLive

Description

The function func_get_args don't work with named arguments

https://3v4l.org/sDNW1#v8.5.3

<?php
function foo(
  string|null $first = null,
  string|null $second = null,
  mixed ...$others
){
    var_dump(func_get_args());
}

foo(others:1);

PHP Version

8.5.3

Operating System

Both

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions