function socket_create(int $domain, int $type, int $protocol) {}
/** @param resource $socket */
-function socket_connect($socket, string $addr, int $port = 0): bool {}
+function socket_connect($socket, string $addr, int $port = UNKNOWN): bool {}
function socket_strerror(int $errno): string {}
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_connect, 0, 2, _IS_BOOL, 0)
ZEND_ARG_INFO(0, socket)
ZEND_ARG_TYPE_INFO(0, addr, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_strerror, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, errno, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_socket_bind arginfo_socket_connect
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_socket_bind, 0, 2, _IS_BOOL, 0)
+ ZEND_ARG_INFO(0, socket)
+ ZEND_ARG_TYPE_INFO(0, addr, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "0")
+ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_recv, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_INFO(0, socket)