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?

-Jason



On Sun, 2002-05-05 at 16:33, Markus Fischer wrote:
>     Hi,
> 
>     technically this isn't a problem at all. I'm just pondering
>     .. socket_strerror() is nothing better then a call to
>     strerror().
> 
>     If we one day decide to introduce a generic strerror()
>     function to PHP it can't automagically fetch the last socket
>     error of course ... that's the only fear/ojections I have.
> 
>     - Markus
> 
> On Sun, May 05, 2002 at 09:23:23PM -0000, [EMAIL PROTECTED] wrote : 
> > From:             [EMAIL PROTECTED]
> > Operating system: any
> > PHP version:      4.2.0
> > PHP Bug Type:     Sockets related
> > Bug description:  enhance socket_strerror(errno) to make errno optional
> > 
> > socket_last_error(socket) was recently enhanced to make the socket
> > optional.
> > 
> > How about doing the same for the error number argument to
> > socket_strerror() ?
> > 
> > So instead of writing:
> >   die (socket_strerror(socket_last_error())
> > I can just write:
> >   die (socket_strerror())
> > 
> > ...Tom Robinson
> > 
> > 
> > -- 
> > Edit bug report at http://bugs.php.net/?id=17022&edit=1
> > -- 
> > Fixed in CVS:        http://bugs.php.net/fix.php?id=17022&r=fixedcvs
> > Fixed in release:    http://bugs.php.net/fix.php?id=17022&r=alreadyfixed
> > Need backtrace:      http://bugs.php.net/fix.php?id=17022&r=needtrace
> > Try newer version:   http://bugs.php.net/fix.php?id=17022&r=oldversion
> > Not developer issue: http://bugs.php.net/fix.php?id=17022&r=support
> > Expected behavior:   http://bugs.php.net/fix.php?id=17022&r=notwrong
> > Not enough info:     http://bugs.php.net/fix.php?id=17022&r=notenoughinfo
> > Submitted twice:     http://bugs.php.net/fix.php?id=17022&r=submittedtwice
> > register_globals:    http://bugs.php.net/fix.php?id=17022&r=globals
> 
> -- 
> Please always Cc to me when replying to me on the lists.
> GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> "I'm not stupid, you know? :)" - Jani Taskinen
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to