|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-09-23 10:01 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2018-09-23 10:01 UTC] cmb@php.net
[2019-03-12 08:59 UTC] nikic@php.net
-Status: Verified
+Status: Duplicate
[2019-03-12 08:59 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 20:00:01 2025 UTC |
Description: ------------ One of my scripts failed because the built-in web server returned the IPv6 value in $_SERVER['REMOTE_ADDR'] with square brackets. The value was '[::1]' (PHP 7.3RC1) instead of '::1' (PHP 7.2.4), although it is no used as a host here (see RFC 3986, 3.2.2). BTW: Also filter_var('[::1]', FILTER_VALIDATE_IP) fails (as expected). Test script: --------------- echo $_SERVER['REMOTE_ADDR'] Expected result: ---------------- ::1 Actual result: -------------- [::1]