Skip to content

Code with argument unpacking not working #19

@Furgas

Description

@Furgas

Code:

function foo(int ...$a) {
	return $a;
}

$ints = [1,2];
foo(...$ints);

Result:
Compile Error: Cannot use positional argument after argument unpacking

Generated code causing the error:

return foo(\PHPSandbox\wrapByRef(...$ints, \PHPSandbox\PHPSandbox::getSandbox('__PHPSandbox_ff7c8ab064063e1d4d509dfbadda498e')));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions