I've got a Problem with PHP parse_url().
My url looks like:
$url = "_search?q=sku:89399";
var_dump(parse_url($url));
According to this, var_dump() returns bool(false) saying this is not a correct url.
But using an url like this works?!
$url = "_search?q=sku:202490";
var_dump(parse_url($url));
var_dump() returns array(2) { ["path"]=> string(7) "_search" ["query"]=> string(12) "q=sku:202490" }
So do you have any idea, why sku:202490 works and and sku:89399 does not ?
Thank you so much!
UPDATE:
Thank you all for your comments. According to the first few comments, i can confirm that the number is being interpreted as port number if it has 5 or less digits. So if a number with 5 or less digits is bigger than 65535 parse_url() will not work.
89399falls within the valid range of values that could be identified as a port (if it checks for number of digits), but that"_search?q=skuis not valid as a protocol, so it complains