Re: cvs: phpdoc /en/reference/network/functions gethostbynamel.xml

From: Date: Mon, 02 Jun 2003 14:32:41 +0000
Subject: Re: cvs: phpdoc /en/reference/network/functions gethostbynamel.xml
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969354180@lists.php.net to get a copy of this message
On 2 Jun 2003, Andrew Lindeman wrote: > I think this kind of screws up the example. The point is that it > returns multiple addresses for the host. The example should show this > behaviour, and since example.com only resolves to 1 IP address, the > example isn't as useful as it was. I disagree. example.com is the official domain to use in documentation and the example still shows a numeric array. Not every domain has multiple addresses, so even in that regard, the example is still useful. Anyway, the main point is it returns an array and the new correct example still demonstrates that. A compromise would be to show a gethostname example side by side to show one returns an array while the other does not. Also, the gethostbyname docs should mention which ip, if multiple ip's exist, is returned. Regards, Philip > > --Andrew > > On Mon, 2003-06-02 at 09:05, Joey Smith wrote: > > joey Mon Jun 2 10:05:55 2003 EDT > > > > Modified files: > > /phpdoc/en/reference/network/functions gethostbynamel.xml > > Log: > > Use example.com instead of yahoo.com > > > > > > Index: phpdoc/en/reference/network/functions/gethostbynamel.xml > > diff -u phpdoc/en/reference/network/functions/gethostbynamel.xml:1.3 > > phpdoc/en/reference/network/functions/gethostbynamel.xml:1.4 > > --- phpdoc/en/reference/network/functions/gethostbynamel.xml:1.3 Mon May 26 23:10:20 2003 > > +++ phpdoc/en/reference/network/functions/gethostbynamel.xml Mon Jun 2 10:05:55 2003 > > @@ -1,5 +1,5 @@ > > <?xml version="1.0" encoding="iso-8859-1"?> > > -<!-- $Revision: 1.3 $ --> > > +<!-- $Revision: 1.4 $ --> > > <!-- splitted from ./en/functions/network.xml, last change in rev 1.2 --> > > <refentry id="function.gethostbynamel"> > > <refnamediv> > > @@ -24,7 +24,7 @@ > > <programlisting role="php"> > > <![CDATA[ > > <?php > > - $hosts = gethostbynamel('www.yahoo.com'); > > + $hosts = gethostbynamel('www.example.com'); > > print_r($hosts); > > ?> > > ]]> > > @@ -35,14 +35,7 @@ > > <![CDATA[ > > Array > > ( > > - [0] => 216.109.125.67 > > - [1] => 64.58.76.228 > > - [2] => 216.109.125.65 > > - [3] => 216.109.125.70 > > - [4] => 64.58.76.226 > > - [5] => 64.58.76.230 > > - [6] => 64.58.76.222 > > - [7] => 216.109.125.66 > > + [0] => 192.0.34.166 > > ) > > ]]> > > </screen> > -- > Andrew Lindeman <alindeman@php.net> > > > -- > PHP Documentation Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.doc (#969354180) next »