btw why isn't foo.bar=123 decoded to array("foo.bar"=>123); ? > this looks pretty bad to me https://3v4l.org/6Wa23
Hi Hans, This is because variables in PHP that contain the concatenation operator or space are much more difficult to access. See https://3v4l.org/vUBWK As the primary purpose of parse_str was to register globals from a query string, it follows the same logic as your normal POST/GET/COOKIE parsing. See https://stackoverflow.com/a/68742/1839439 Perhaps, instead of adjusting this behaviour only for the new function, we could remove this behaviour as a whole, given that it is a remainder of the long-forgotten register globals? I don't see any use for it anymore, as all parsed input is only available in the form of an associative array. People who extract $_POST can suffer the consequences of their own actions... Regards, Kamil