parse_url() returns 'pubmed.ncbi.nlm.nih.gov' for the input URL. The www. stripping via ltrim only removes leading w/. characters; a non-www subdomain is preserved in full. The code was correct; the test expected a wrong value. Agent-Session: geomonitor v0.1.0