parse_str Parses the string into variables &reftitle.description; voidparse_str stringencoded_string arrayresult 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). &reftitle.parameters; encoded_string The input string. result If the second parameter result is present, variables are stored in this variable as array elements instead. Using this function without the result parameter is highly DISCOURAGED and DEPRECATED as of PHP 7.2. Dynamically setting variables in function's scope suffers from exactly same problems as register_globals. Read section on security of Using Register Globals explaining why it is dangerous. &reftitle.returnvalues; &return.void; &reftitle.changelog; &Version; &Description; 7.2.0 Usage of parse_str without a second parameter now emits an E_DEPRECATED notice. &reftitle.examples; Using <function>parse_str</function> ]]> 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. <function>parse_str</function> name mangling ]]> &reftitle.notes; All variables created (or values returned into array if second parameter is set) are already urldecoded. To get the current QUERY_STRING, you may use the variable $_SERVER['QUERY_STRING']. Also, you may want to read the section on variables from external sources. The magic_quotes_gpc setting affects the output of this function, as parse_str uses the same mechanism that PHP uses to populate the $_GET, $_POST, etc. variables. &reftitle.seealso; parse_url pathinfo http_build_query urldecode