[PHP-DOC] #20394 [Opn->Csd]: prev(), next(), current(), end() should say 'value' rather than 'element'
ID: 20394 Updated by: [EMAIL PROTECTED] Reported By: phpbugs at priorwebsites dot com -Status: Open +Status: Closed Bug Type:Documentation problem PHP Version: 4.3.0-pre2 New Comment: They don't return false, but they return values that evaluate to false inside of an if() or a while(). Previous Comments: [2003-07-18 03:40:18] [EMAIL PROTECTED] The docs seem wrong, or at least I don't understand them. For example, when it says if the element is 0 or "", current() will return boolean false ... In testing, if either the value or key equals 0, it returns 0, not false. Maybe it's referring to == vs === type checking? Or behavior has changed? Either way, rewording is required. I've updated the docs for prev/next/current/end to reflect the following view: element = key/value pair value = array value (i.e. array('key' => 'value')) And added your example to all but end()'s docs. Am leaving this report open until someone clears up the 'if element equal 0 or "", this returns boolean false' issue. [2002-11-12 10:31:58] phpbugs at priorwebsites dot com In the array documentation for current(), prev(), next(), end(), it should use the word 'value' wherever it means the value in the key=>value pair, and not the word element. I was struggling to understand what the array functions prev() and next() return, as I rarely use them, since each() normally does what is needed. I understand well when the array documentation talks about 'key' and 'value', but here was a seemingly new concept to me, 'element'. At one stage I thought it must return the same as each(), i.e. the $key=>$value pair, though comparing the datatypes returned disproved this theory. Finally, I deduced from the documentation for current() which talks about when the value is 0 or "", that what is returned is what is normally referred to in the array documentation as 'value'. It should not require such detective work!! Maybe an example in, say, prev(), would make it all clear: $transport = {'foot', 'bike', 'car', 'plane'} $mode = current($transport); // $mode = 'foot'; $mode = next($transport); // $mode = 'bike'; $mode = next($transport); // $mode = 'car'; $mode = prev($transport); // $mode = 'bike' again $mode = end($transport); // $mode = 'plane' -- Edit this bug report at http://bugs.php.net/?id=20394&edit=1
[PHP-DOC] cvs: phpdoc /en/reference/mysqli/functions mysqli-free-result.xml
baoengb Fri Mar 26 16:14:58 2004 EDT Modified files: /phpdoc/en/reference/mysqli/functions mysqli-free-result.xml Log: use of http://cvs.php.net/diff.php/phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml diff -u phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.4 phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.5 --- phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml:1.4 Wed Jan 28 18:18:42 2004 +++ phpdoc/en/reference/mysqli/functions/mysqli-free-result.xml Fri Mar 26 16:14:57 2004 @@ -1,5 +1,5 @@ - + mysqli_free_result @@ -19,7 +19,7 @@ void free - void +
[PHP-DOC] #27710 [Opn]: ip2long() calculates networks (partial ip addr.) wrong
ID: 27710 Updated by: [EMAIL PROTECTED] Reported By: phpbug at labres dot at Status: Open -Bug Type: Math related +Bug Type: Documentation problem Operating System: Linux, FreeBSD PHP Version: 4.3.4 New Comment: Yup, it should be. Previous Comments: [2004-03-26 09:09:10] phpbug at labres dot at I've now read the documentation of inet_addr(), so this is a feature. Maybe it should be documented. [2004-03-26 05:21:20] phpbug at labres dot at tested on different OS'es. [2004-03-26 05:11:48] phpbug at labres dot at Description: When given network addresses (partial ip addresses)*), ip2long() calculates erratic values: InputOutput dechexshould be 192 int(192) c0c000 192.168 int(-1073741656) c0a8 c0a8 192.168.1int(-1062731775) c0a80001 c0a80100 *) you will need this to convert 192/8, 192.168/16 etc network addresses. Reproduce code: --- $net=ip2long("192"); echo dechex($net)."\n"; $net=ip2long("192.168"); echo dechex($net)."\n"; $net=ip2long("192.168.1"); echo dechex($net)."\n"; Expected result: c000 c0a8 c0a80100 Actual result: -- c0 c0a8 c0a80001 -- Edit this bug report at http://bugs.php.net/?id=27710&edit=1
[PHP-DOC] cvs: phpdoc /en/reference/gettext/functions gettext.xml
vrana Fri Mar 26 03:42:23 2004 EDT Modified files: /phpdoc/en/reference/gettext/functions gettext.xml Log: See also setlocale http://cvs.php.net/diff.php/phpdoc/en/reference/gettext/functions/gettext.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc/en/reference/gettext/functions/gettext.xml diff -u phpdoc/en/reference/gettext/functions/gettext.xml:1.6 phpdoc/en/reference/gettext/functions/gettext.xml:1.7 --- phpdoc/en/reference/gettext/functions/gettext.xml:1.6 Mon Dec 15 11:50:33 2003 +++ phpdoc/en/reference/gettext/functions/gettext.xml Fri Mar 26 03:42:19 2004 @@ -1,5 +1,5 @@ - + @@ -40,6 +40,10 @@ ]]> + + See also + setlocale. +