socket_addrinfo_explain
Description
The socket_addrinfo_explain of Sockets for PHP get information about addrinfo.
Syntax
socket_addrinfo_explain( AddressInfo $address ): array
Parameters
address
AddressInfo instance created from socket_addrinfo_lookup()
Return
Returns an array containing the fields in the addrinfo structure.
Examples
1 · address
<? $host = '127.0.0.1'; $address = socket_addrinfo_lookup($host)[0]; $return = socket_addrinfo_explain($address); print_r($return);
Array ( [ai_flags] => 0 [ai_family] => 2 [ai_socktype] => 1 [ai_protocol] => 6 [ai_addr] => Array ( [sin_port] => 0 [sin_addr] => 127.0.0.1 ) )
Links
Sockets
- socket_accept
- socket_addrinfo_bind
- socket_addrinfo_connect
- socket_addrinfo_lookup
- socket_atmark
- socket_bind
- socket_clear_error
- socket_close
- socket_cmsg_space
- socket_connect
- socket_create
- socket_create_listen
- socket_create_pair
- socket_export_stream
- socket_get_option
- socket_getopt
- socket_getpeername
- socket_getsockname
- socket_import_stream
- socket_last_error
- socket_listen
- socket_read
- socket_recv
- socket_recvfrom
- socket_recvmsg
- socket_select
- socket_send
- socket_sendmsg
- socket_sendto
- socket_set_block
- socket_set_nonblock
- socket_set_option
- socket_setopt
- socket_shutdown
- socket_strerror
- socket_write
- socket_wsaprotocol_info_export
- socket_wsaprotocol_info_import
- socket_wsaprotocol_info_release