note 118803 deleted from reserved.variables.argv by cmb
| From: | cmb@php.net | Date: | Sun, 05 Jan 2020 08:47:24 +0000 |
| Subject: | note 118803 deleted from reserved.variables.argv by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213770@lists.php.net to get a copy of this message | ||
Note Submitter: fabio at naoimporta dot com
----
When you pass an option to the file that intercept the request, it will be transformed into an array
item, and the option name will be lost. Only its content is captured.
<?php
var_dump($argv);
?>
call : "php file.php --test=foo baz"
will print
array(3) {
[0] =>
string(16) "file.php"
[1] =>
string(3) "foo"
[2] =>
string(3) "baz"
}