Standards compliant parsing of networking units in PHP