The socket functions described here are part of an extension to PHP which must be enabled at compile time by giving the --enable-sockets option to configure.
Note: IPv6 支持是 PHP 5.0.0 新加的。