|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54078 Array / string functions parameter inconsistence
Submitted: 2011-02-23 13:23 UTC Modified: -
Avg. Score:4.3 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: martin dot keckeis1 at gmail dot com Assigned:
Status: Open Package: *General Issues
PHP Version: 5.3.5 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: martin dot keckeis1 at gmail dot com
New email:
PHP Version: OS:


 [2011-02-23 13:23 UTC] martin dot keckeis1 at gmail dot com
In the string and array functions the $needle and $haystack parameter doesn't have the same order.

From the documentation:
int stripos ( string $haystack , string $needle [, int $offset = 0 ] )
mixed array_search ( mixed $needle , array $haystack [, bool $strict ] )

This is a very confusing inconsistence for me, since I program now PHP for several years, I cannot accustom on this.

And I'm sure not the only one -> maybe a change for the next version 5.4 or 6.0?

Best regards


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC