Normally using parse_str('name=me&hungry=yes') will make a variable $name and hungry be equal to 'me' and 'yes' respectively.
The problem with using this function is that I’m running it through user input and feel uncomfortable making sure I can’t get any attacks because of this, since the variables are being put on the global namespace.
Is there any way to make this functionality only put values into a given variable? For example something like parse_str('name=me&hungry=yes', $obj) will make obj be equal to
array('name' => 'me', 'hungry' => 'yes');
Not only for example, but exactly. See
parse_strDocs, especially the examples.