Skip to content

Remaining args / -- argument separator? #73

Open
@bwoebi

Description

I'd like to be able to grab the trailing args:

php foo.php -d val foo bar
php foo.php -d val -- foo bar

Then I want to get an array ["foo", "bar"] back.

(-- is common as an argument separator, like everything, including arguments with a leading -, following is passed literally to somewhere else.)

I've searched for it in the docs, but actually found no way how to grab every trailing arg. I've only found a way to grab a single arg...

Was this an oversight in the implementation or was there just some undocumented feature?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions