3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = 'http://mysite.com/hello/world?look_at=me'; $query = parse_str($url); var_dump($query); $url = 'http://mysite.com/hello/world?look_at=me&test=1'; $query = parse_url($url, PHP_URL_QUERY); var_dump(http_build_query(array_merge($query)));
based on 0LNpY
Output for 7.2.0
Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in /in/DlXHC on line 3 NULL Warning: array_merge(): Argument #1 is not an array in /in/DlXHC on line 8 Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /in/DlXHC on line 8 bool(false)
Output for 5.3.18 - 7.1.10
NULL Warning: array_merge(): Argument #1 is not an array in /in/DlXHC on line 8 Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /in/DlXHC on line 8 bool(false)