I am compressing some CSS and JS files and have few methods that use parse_url to get the url components. Just found out that prior to php 5.3.28 there is no host and my compression function heavily rely on it in order to get the correct paths.
So on php 5.3.28 < I get
Array
(
[path] => //fonts.googleapis.com/css
[query] => family=Open+Sans
)
and 5.3.28 >
Array
(
[host] => fonts.googleapis.com
[path] => /css
[query] => family=Open+Sans
)
can anyone post a possible replacement function or the actual 5.3.28 > parse_url or a regex I could work with.
Any help is appreciated.