[EMAIL PROTECTED] writes: > > Thanks for bringing that up, Jon. How do I know which version of the > > documentation applies to a particular released version of PHP? We're still > > using php 4.0.6 where I work, but the documentation for the sockets library > > (for example) reflects some newer (unspecified) version and doesn't apply what > > I'm using. Is the documentation versioned in some way I'm missing? > > It's not versioned. Most of the time the documentation refers to the > latest release (or even CVS version). Also if you are going to play with > sockets you really shoul be using versions later than 4.0.6.
I really think it should be. Your statement above makes the documentation worthless to everyone who isn't up to validating the docs against the PHP source. As an example, the documentation for socket_connect()[1] states that The address parameter is either an IP address in dotted-quad notation (e.g. 127.0.0.1), if the socket is of the AF_INET family The (all-but-undocumented) source for sockets.c[2] shows socket_connect() is pretty liberal in what form it will take and in fact attempts the gethostbyname() call itself in php_set_inet_addr(). The documentation imples that the user must perform a gethostbyname(), which no longer exists either in the documentation nor in the extension itself. Yes, I understand the caveat expressed in the warning in the documentation regarding the sockets extension being experimental, but that doesn't matter one iota if the documentation on php.net reflects cvs. [1] http://www.php.net/manual/en/function.socket-connect.php [2] http://cvs.php.net/co.php/php4/ext/sockets/sockets.c?r=1.121 -- Brian Lalor [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php