Back to index

php5  5.3.10
ipv6_skipif.inc
Go to the documentation of this file.
00001 <?php
00002 if (!defined("AF_INET6")) {
00003        die('skip no IPv6 support');
00004 }
00005 /* If IPv6 is supported on the platform this will error out with code 111 - Connection refused.
00006    If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error) */
00007 @stream_socket_client('tcp://[::1]:0', $errno);
00008 if ($errno != 111) die('skip no IPv6 support');