note 123994 added to function.parse-url

From: Date: Sun, 30 Jun 2019 18:52:15 +0000
Subject: note 123994 added to function.parse-url
Groups: php.notes 
Request: Send a blank email to php-notes+get-211451@lists.php.net to get a copy of this message
There's a quirk where this function will return the host as the "path" if there is a leading space. <?php $url = ' https://foobar.com:80/mypath/myfile.php'; print_r(parse_url($url)); /* Array ( [path] => https://foobar.com:80/mypath/myfile.php ) */ print_r(trim(parse_url($url))); /* Array ( [scheme] => https [host] => foobar.com [port] => 80 [path] => /mypath/myfile.php ) */ ?> ---- Server IP: 208.43.231.9 Probable Submitter: 185.85.3.195 (proxied: 71.201.168.147) ---- Manual Page -- http://php.net/manual/en/function.parse-url.php Edit -- https://master.php.net/note/edit/123994 Del: integrated -- https://master.php.net/note/delete/123994/integrated Del: useless -- https://master.php.net/note/delete/123994/useless Del: bad code -- https://master.php.net/note/delete/123994/bad+code Del: spam -- https://master.php.net/note/delete/123994/spam Del: non-english -- https://master.php.net/note/delete/123994/non-english Del: in docs -- https://master.php.net/note/delete/123994/in+docs Del: other reasons-- https://master.php.net/note/delete/123994 Reject -- https://master.php.net/note/reject/123994 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#211451) next »