Re: Question about socket ext. file descriptors

From: Date: Fri, 30 Mar 2001 22:17:33 +0000
Subject: Re: Question about socket ext. file descriptors
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-50390@lists.php.net to get a copy of this message
At 20:11 30/3/2001, chrisv@b0rked.dhs.org wrote:
I'm currently updating my CVS tree so I can update the current source with something to make sure that stuff opened here is closed at the end of it. For this, I'm not too fond of going the resource route for it, simply because I know people are more familiar with the C interfaces to socket() and friends (I know I'm not alone in this, but if I seem to be, feel free to speak up now).. so it makes the interfaces more familiar to people who would want to use it (and since I tried to keep the interfaces as similar as possible, it also means that people don't have to go running to the manual for everything except for the few oddities .. 'man socket' will tell you all you need to know about socket() on any decent *nix system.)
It's a pretty clear cut here - keeping the rules of PHP comes before similarity to the C interface. This covers the fact that failure should be denoted by a false return value, and that that things such as file or socket descriptors should be returned as resource handles. Having people use the UNIX 2/3 man pages to understand what the PHP functions do isn't considered a significant benefit - people are likely to check the PHP manual and not the UNIX manual anyway (man pages are just another type of a manual, hence their name :) Moving this code to use the standard PHP interface is something that should be done for 4.0.6. Zeev

« previous php.dev (#50390) next »