3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = "http://somedomain/somefolder/someresoure/somemodel/someaction/id?option=1&sales=mr.%20Ed"; $query = parse_url(urldecode($url), PHP_URL_QUERY); parse_str($query,$parts); echo $parts['sales']; ?>
based on LgMm4
Output for 5.1.2 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
mr. Ed
Output for 4.3.0 - 5.1.1
Notice: Use of undefined constant PHP_URL_QUERY - assumed 'PHP_URL_QUERY' in /in/71OIC on line 4 Warning: parse_url() expects exactly 1 parameter, 2 given in /in/71OIC on line 4 Notice: Undefined index: sales in /in/71OIC on line 9