[php-src] Issue #21894: PHP command line help text doesn't match behaviour (double dash usage)

[email protected] (bug-fix0r)
Newsgroups php.bugs
Message-ID <ptPC4ZSqJhL1PGRPipIpliqWSk3VxrRdnqGZgpmOIW0@main.internal.php.net>
Issue: https://github.com/php/php-src/issues/21894
Author: bug-fix0r

### Description

When I run **php --help** it says:

`Usage: php [options] [-f] <file> [--] [args...]`

The following code (when run using **php test.php -- test**):

```php
<?php
var_dump($argv);
```

Resulted in this output:
```
array(3) {
  [0]=>
  string(8) "test.php"
  [1]=>
  string(2) "--"
  [2]=>
  string(4) "test"
}
```

But I expected this output instead:
```
array(3) {
  [0]=>
  string(8) "test.php"
  [1]=>
  string(4) "test"
}
```

So in my opinion either the help text or the code needs a fix.

### PHP Version

```plain
PHP 8.5.4 (cli)
```

### Operating System

Kubuntu 26.04 LTS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.