1--TEST-- 2Bug #51958: socket_accept() fails on IPv6 server sockets 3--EXTENSIONS-- 4sockets 5--SKIPIF-- 6<?php 7 8if (!defined('IPPROTO_IPV6')) { 9 die('skip IPv6 not available.'); 10} 11if (PHP_OS != "WINNT") 12 die('skip test relies Winsock\'s error code for WSAEWOULDBLOCK/EAGAIN'); 13--FILE-- 14<?php 15$listenfd = socket_create(AF_INET6, SOCK_STREAM, SOL_TCP); 16socket_bind($listenfd, "::1", 13579); 17socket_listen($listenfd); 18socket_set_nonblock($listenfd); 19$connfd = @socket_accept($listenfd); 20echo socket_last_error(); 21?> 22--EXPECT-- 2310035 24