“Request For” RFC
Parses encoded_string as if it were the query string passed via a URL and sets variables in the current scope (or in the array if result is provided).
Because variables in PHP can’t have dots and spaces in their names, those are converted to underscores. Same applies to naming of respective key names in case of using this function with result parameter.
- whoop de doo. array keys can
- re “in case of using this function with result parameter” : Not using the result param is deprecated
- There should be a 3rd param to disable this legacy behavior
Warning This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
$_POST
, $_GET
, & $_REQUEST
:
there should be an option to preserve “.” and ” “
/mypage.php?foo.bar=baz
// $_GET = array(‘foo_bar’ => ‘baz’)
- It’s time for this legacy behavior to die. There is zero reason for not preserving ‘foo.bar’
- It’s time for a request_keys_legacy boolean php.ini setting
parse_str
should have an 3rd param to optionally disable the character translation when using the 2nd param (not using the 2nd param is already deprecated)
Thoughts?
submitted by /u/bkdotcom
[link] [comments]