note 118803 added to reserved.variables.argv
| From: | fabio at naoimporta dot com | Date: | Mon, 08 Feb 2016 23:41:18 +0000 |
| Subject: | note 118803 added to reserved.variables.argv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204901@lists.php.net to get a copy of this message | ||
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"
}
----
Server IP: 72.52.91.14
Probable Submitter: 177.133.50.232
----
Manual Page -- http://php.net/manual/en/reserved.variables.argv.php
Edit -- https://master.php.net/note/edit/118803
Del: integrated -- https://master.php.net/note/delete/118803/integrated
Del: useless -- https://master.php.net/note/delete/118803/useless
Del: bad code -- https://master.php.net/note/delete/118803/bad+code
Del: spam -- https://master.php.net/note/delete/118803/spam
Del: non-english -- https://master.php.net/note/delete/118803/non-english
Del: in docs -- https://master.php.net/note/delete/118803/in+docs
Del: other reasons-- https://master.php.net/note/delete/118803
Reject -- https://master.php.net/note/reject/118803
Search -- https://master.php.net/manage/user-notes.php