3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = 'http://example.org/?rft.id=123456'; $array = array(); parse_str(parse_url ($url, PHP_URL_QUERY), $array); var_dump($array);
based on NkhoY
Output for 5.1.2 - 7.2.0
array(1) { ["rft_id"]=> string(6) "123456" }
Output for 4.3.0 - 5.1.1
Notice: Use of undefined constant PHP_URL_QUERY - assumed 'PHP_URL_QUERY' in /in/34Je7 on line 5 Warning: parse_url() expects exactly 1 parameter, 2 given in /in/34Je7 on line 5 array(0) { }