php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61762 document problem
Submitted: 2012-04-18 09:45 UTC Modified: 2012-04-19 07:11 UTC
From: frankcoal at gmail dot com Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.4.0 OS: window xp
Private report: No CVE-ID: None
 [2012-04-18 09:45 UTC] frankcoal at gmail dot com
Description:
------------
in the document description said that:
Version	Description
4.2.0	 Prior to PHP 4.2.0, array_search() returns NULL on failure instead of FALSE.

in my windows xp system,the php version is 5.2.0,but i found the returns Value is already NULL,perhaps this is problem? perhaps, Prior to PHP 5.2.0,array_search() returns NULL on failure instead of FALSE.

ok,that is all!
 




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-19 07:11 UTC] aharvey@php.net
-Status: Open +Status: Not a bug -Package: *Regular Expressions +Package: Arrays related
 [2012-04-19 07:11 UTC] aharvey@php.net
I believe you're mistaken:

<?php
$a = array(1, 2);
var_dump(array_search(1, $a, true));
var_dump(array_search(3, $a, true));
?>

Prints:

int(0)
bool(false)

Which lines up with the documentation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 06:01:29 2024 UTC