--- /dev/null
+<?php
+if (!defined("AF_INET6")) {
+ die('skip no IPv6 support');
+}
+/* If IPv6 is supported on the platform this will error out with code 111 - Connection refused.
+ If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error) */
+@stream_socket_client('tcp://[::1]:0', $errno);
+if ($errno != 111) die('skip no IPv6 support');
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
- if (!defined("AF_INET6")) {
- die('skip no IPv6 support');
- }
+ require 'ipv6_skipif.inc';
?>
--FILE--
<?php
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
}
+require 'ipv6_skipif.inc';
--FILE--
<?php
$socket = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP);