note 118008 added to function.parse-str
| From: | StanE | Date: | Thu, 17 Sep 2015 21:57:25 +0000 |
| Subject: | note 118008 added to function.parse-str | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203803@lists.php.net to get a copy of this message | ||
Note that the characters "." and " " (empty space) will be converted to
"_". The characters "[" and "]" have special meaning: They represent
arrays but there seems to be some weird behaviour, which I don't really understand:
<?php
// Note: "[" = %5B, "]" = %5D
/*
"v][=a" produces ("[" gets replaced by "_"):
Array
(
[v]_] => a
)
*/
parse_str("v%5D%5B=a", $r);
print_r($r);
/*
"v][[=a" produces (first "[" gets replaced by "_", but not all
following):
Array
(
[v]_[] => a
)
*/
parse_str("v%5D%5B%5B=a", $r);
print_r($r);
?>
----
Server IP: 72.52.91.14
Probable Submitter: 85.179.3.117
----
Manual Page -- http://php.net/manual/en/function.parse-str.php
Edit -- https://master.php.net/note/edit/118008
Del: integrated -- https://master.php.net/note/delete/118008/integrated
Del: useless -- https://master.php.net/note/delete/118008/useless
Del: bad code -- https://master.php.net/note/delete/118008/bad+code
Del: spam -- https://master.php.net/note/delete/118008/spam
Del: non-english -- https://master.php.net/note/delete/118008/non-english
Del: in docs -- https://master.php.net/note/delete/118008/in+docs
Del: other reasons-- https://master.php.net/note/delete/118008
Reject -- https://master.php.net/note/reject/118008
Search -- https://master.php.net/manage/user-notes.php