php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50329 should be false
Submitted: 2009-11-30 09:36 UTC Modified: 2009-11-30 19:16 UTC
From: bugzilla33 at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.3.1 OS: win32 7
Private report: No CVE-ID: None
 [2009-11-30 09:36 UTC] bugzilla33 at gmail dot com
Description:
------------
bug in manual

Reproduce code:
---------------
---
From manual page: function.array-search#Changelog
---


Expected result:
----------------
4.2.0 Prior to PHP 4.2.0, array_search() returns NULL on failure instead of FALSE. 

Actual result:
--------------
PHP 5.3.1 returns FALSE on failure, no NULL

<?
 var_dump(array_search('x',array('a'=>'a','b'=>'b','c'=>'c','d'=>'d')));
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-30 12:30 UTC] rquadling@php.net
The documentation is correct.

PHP < 4.2.0 Null is returned on failure.
PHP >= 4.2.0 False is returned on failure.

Note the use of the words "Prior to PHP 4.2.0".
 [2009-11-30 12:31 UTC] rquadling@php.net
The documentation is correct.

PHP < 4.2.0 Null is returned on failure.
PHP >= 4.2.0 False is returned on failure.

Note the use of the words "Prior to PHP 4.2.0".
 [2009-11-30 19:16 UTC] bugzilla33 at gmail dot com
Ok, Polish translation is incorrect !!
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 12:00:02 2026 UTC