Bugs & Features
@ 2013-04-07 00:36:19
<?php $url = "http://mysite.com/browse/department/?pid=1&order_by=a_z&filter=1"; print_r(parse_url($url)); print_r(explode("/",parse_url($url, PHP_URL_PATH)));
Output for 5.1.2 - 5.6.8, php7@20140507 - 20150501, hhvm-3.6.0 - 3.7.0
Array ( [scheme] => http [host] => mysite.com [path] => /browse/department/ [query] => pid=1&order_by=a_z&filter=1 ) Array ( [0] => [1] => browse [2] => department [3] => )
Output for 4.3.0 - 5.1.1
Array ( [scheme] => http [host] => mysite.com [path] => /browse/department/ [query] => pid=1&order_by=a_z&filter=1 ) Notice: Use of undefined constant PHP_URL_PATH - assumed 'PHP_URL_PATH' in /in/gYDN5 on line 4 Warning: parse_url() expects exactly 1 parameter, 2 given in /in/gYDN5 on line 4 Array ( [0] => )