As a programmer fairly new to the PHP socket functions, there is a long enough list of them already. For the most part, they match the C functions. socket_last_error() doesn't have a C equivalent, because of the difference in environment. But in the PHP tradition, socket_last_error has two flavours, where the shortest one is the one that can be used 90% of the time. I personally would not want to see yet another function for socket_last_errstr() - ever time a new function is added to the list, it makes the list a little bit longer and a little bit less approachable for newcomers. My suggestion was to shorten up the case where socket_strerror is used 90% of the time. I would extend my suggestion to say I would NOT want a new socket_last_errstr($sock) function. It was just a simple little suggestion for a coding shortcut, with no new functionality added, therefore not worthy of its own new function. Since no new functionality is added, I can (and did) code my own in PHP for use after almost all my socket calls. ...Tom
>I think the requested behavior does not belong in socket_strerror() >simply because it would not match the primary and other use of >socket_last_error(). In other words, you would not be able to replace >the behavior of > >socket_strerror(socket_last_error($sock)); > >What could be possible, would be to add something like >socket_last_errstr, which could then follow the same semantics of >socket_last_error. This would be a much more consistent. >i.e. >socket_last_errstr($sock); >socket_last_errstr(); > >Would this be acceptable? -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php