xref: /PHP-5.3/ext/sockets/tests/ipv6_skipif.inc (revision 808acd6b)
1<?php
2if (!defined("AF_INET6")) {
3	die('skip no IPv6 support');
4}
5/* If IPv6 is supported on the platform this will error out with code 111 - Connection refused.
6   If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error) */
7@stream_socket_client('tcp://[::1]:0', $errno);
8if ($errno != 111) die('skip no IPv6 support');
9