|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-27 21:23 UTC] pollita@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 21 23:00:01 2025 UTC |
Description: ------------ parse_url doesn't handle embedded IPv6 addresses (RFC 2732) Reproduce code: --------------- print_r(parse_url('http://[::1]/')); Expected result: ---------------- Array ( [scheme] => http [host] => [::1] [path] => / ) Actual result: -------------- Array ( [scheme] => http [host] => [ [path] => / ) With a full IPv6 address like 1234:1234:1234:1234:1324:1234:1234 it doesn't even get that far: PHP Warning: parse_url(http://[1234:1234:1234:1234:1324:1234:1234:1234]/): Unable to parse url in Command line code on line 1