Why do you need to rely on such behavior? Are you trying to do something 
naught? :)
I think in general it's not a good idea to rely on the value and type of 
resources (even though this is an integer).
I'm not quite sure why it returns integers and not resources. Looks like a 
bad thing to me as the extension can easily have file descriptor leaks. The 
socket should really be saved either in the resource list or in a socket 
extension local list in order to be able to cleanup at shutdown.
I think in the meanwhile you should assume it might change to using resources.


At 10:56 PM 3/28/2001 -0800, Lars Torben Wilson wrote:

>At present, the sockets extension uses integers as file descriptors
>(e.g. socket() return value). At first I thought maybe they should
>have been resources until I tried writing some socket code, when I
>realized that it's easier under many circumstances for them to be
>ints. Is this going to be behaviour that can be relied upon?
>|Torben Wilson <[EMAIL PROTECTED]>                    Adcore Finland|
>|http://www.coastnet.com/~torben            http://www.adcore.com|
>|Ph: 1.604.709.0506                             [EMAIL PROTECTED]|
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to