php.net |  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: -
Votes:3
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-02-23 13:23 UTC] martin dot keckeis1 at gmail dot com
Description:
------------
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
Martin


Patches

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