[PHP-DEV] socket_addrinfo_lookup changes to get resolution failures errors

Hi,

A feature request about this had been created recently, https://github.com/php/php-src/issues/20532 and I do agree it would be an useful information to get rather just FALSE at the moment.

The actual PR just return the error code but bukka raised a good point, why not just adding an optional parameter if you wish to know about this, changing towards this direction does not bother me I ll very likely lean towards it.

As said however I do not think using socket_last_error() for this would be a good thing.

Let me know your thoughts on this.

Cheers !