3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function uri_to_array($uri){ $result = array(); var_dump(strpos($uri, '?')); if ($pos = strpos($uri, '?') !== false) { $pos += 1; } else { $pos = 0; } parse_str(substr($uri, (int) $pos), $result); return $result; } print_r( uri_to_array('sub_page=products&action[]=add&action[]=remove') );
based on WCLvZ
Output for 4.3.0 - 7.2.0
bool(false) Array ( [sub_page] => products [action] => Array ( [0] => add [1] => remove ) )