Skip to content

Instantly share code, notes, and snippets.

@mattijs
Created October 31, 2010 21:47
Show Gist options
  • Save mattijs/657201 to your computer and use it in GitHub Desktop.
Save mattijs/657201 to your computer and use it in GitHub Desktop.
Break down a query string in PHP 5.3 using an anonymous function
$chop = function($query) {
parse_str($query);
unset($query);
return get_defined_vars();
};
$query = $chop("catid=1&follow=false");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment