#36307 [NEW]: array_search() - wrong version info in Polish docs
| From: | xjd at wp dot pl | Date: | Mon, 06 Feb 2006 20:22:58 +0000 |
| Subject: | #36307 [NEW]: array_search() - wrong version info in Polish docs | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969371839@lists.php.net to get a copy of this message | ||
From: xjd at wp dot pl
Operating system: Irrelevant
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: array_search() - wrong version info in Polish docs
Description:
------------
The Polish doc page (
http://www.php.net/manual/pl/function.array-search.php
) says that
returned value (if search didn't find anything) is NULL _starting_ from
PHP 4.1.2, while the English one says that function returns NULL _prior_
to PHP 4.2.0.
[EN:] Note: Prior to PHP 4.2.0, array_search() returns NULL on failure
instead of FALSE.
[PL:] Notatka: Począwszy od PHP 4.1.2, array_search() zwraca NULL w
przypadku niepowodzenia zamiast FALSE
It looks to me like the first (English) one is correct. Below is a simple
test script.
Also, in Polish doc there is different version number but I cannot confirm
which is proper (I guess the one in English doc).
Reproduce code:
---------------
<?php
echo 'Current PHP version: ' . phpversion() . "\n";
$arr = array('the', 'show', 'must', 'go', 'on');
$result = array_search('bleah', $arr);
if ($result === FALSE) {
echo 'search result: FALSE';
} else if ($result === NULL) {
echo 'search result: NULL';
} else {
echo 'search result: "bleah" was found';
}
?>
Expected result:
----------------
/** according to Polish doc **/
Current PHP version: 5.0.4
search result: NULL
Actual result:
--------------
Current PHP version: 5.0.4
search result: FALSE
--
Edit bug report at http://bugs.php.net/?id=36307&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36307&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36307&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36307&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36307&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36307&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36307&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36307&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36307&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36307&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36307&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36307&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36307&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36307&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36307&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36307&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36307&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36307&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36307&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36307&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36307&r=mysqlcfg