|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-08-12 19:05 UTC] alec at alec dot pl
Description:
------------
I always used this constant to detect if PHP is compiled with IPv6 support. On PHP7 which via phpinfo() says it has enabled IPv6 support defined('AF_INET6') returns false.
I use packages from https://launchpad.net/~ondrej/+archive/ubuntu/php-7.0.
Test script:
---------------
echo (int) defined('AF_INET6');
Expected result:
----------------
1
Actual result:
--------------
0
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 05:00:01 2025 UTC |
AF_INET6 is defined in the sockets extension, so check whether it's loaded in the PHP info or by calling `extension_loaded("sockets"))`.