3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = "_search?q=sku:89399"; var_dump(parse_url($url)); $url = "_search?q=sku:202490"; var_dump(parse_url($url)); $url = "_search?q=sku.89399"; var_dump(parse_url($url)); $url = "_search?q=sku.202490"; var_dump(parse_url($url));
based on 6CkeE
Output for 7.0.0 - 7.2.0
array(2) { ["path"]=> string(7) "_search" ["query"]=> string(11) "q=sku:89399" } array(2) { ["path"]=> string(7) "_search" ["query"]=> string(12) "q=sku:202490" } array(2) { ["path"]=> string(7) "_search" ["query"]=> string(11) "q=sku.89399" } array(2) { ["path"]=> string(7) "_search" ["query"]=> string(12) "q=sku.202490" }
Output for 5.3.20 - 5.6.28
bool(false) array(2) { ["path"]=> string(7) "_search" ["query"]=> string(12) "q=sku:202490" } array(2) { ["path"]=> string(7) "_search" ["query"]=> string(11) "q=sku.89399" } array(2) { ["path"]=> string(7) "_search" ["query"]=> string(12) "q=sku.202490" }