If you wish a version of parse_str sans magic quotes, the following will do the trick:
<?php
function parse_query($str) {
$pairs = explode('&', $str);
foreach($pairs as $pair) {
list($name, $value) = explode('=', $pair, 2);
global $$name;
$$name = $value;
}
}
?>