|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesearly_draft (last revision 2011-07-15 08:40 UTC by ivan dot enderlin at hoa-project dot net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-15 11:25 UTC] dsp@php.net
[2011-07-15 11:26 UTC] dsp@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: dsp
[2011-07-15 11:26 UTC] dsp@php.net
[2011-07-15 13:24 UTC] ivan dot enderlin at hoa-project dot net
[2012-04-18 09:49 UTC] laruence@php.net
[2012-07-24 23:40 UTC] rasmus@php.net
[2013-11-17 09:37 UTC] laruence@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 03:00:01 2025 UTC |
Description: ------------ If PHP has been compiled with the --disable-ipv6 option, the constant STREAM_PF_INET6 should not exist. It could be useful to detect whether IPv6 has been enabled. To ensure BC, it would be better to set STREAM_PF_INET6 to -1 (or 0, falseā¦). We could already detect if IPv6 has been disabled with the AF_INET6 constant, declared in ext/sockets/sockets.c with #if HAVE_IPV6, but this solution is worthless if PHP has been compiled with the --disable-socket option. We could use IPv6 with stream_* functions, not only with socket_* functions. Test script: --------------- $ php -r "var_dump(defined('STREAM_PF_INET6'), STREAM_PF_INET6);" $ php -i | grep "IPv6" Expected result: ---------------- bool(true) int(-1) IPv6 Support => disabled Actual result: -------------- bool(true) int(30) IPv6 Support => disabled