Req #54078 [Com]: Array / string functions parameter inconsistence

From: Date: Sat, 05 May 2018 20:56:55 +0000
Subject: Req #54078 [Com]: Array / string functions parameter inconsistence
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215098@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=54078&edit=1 ID: 54078 Comment by: spam2 at rhsoft dot net Reported by: martin dot keckeis1 at gmail dot com Summary: Array / string functions parameter inconsistence Status: Wont fix Type: Feature/Change Request Package: *General Issues PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: literally everybody using php complains many years about such inconsistencies and similar exists in database functions but sadly change it would be painful now because of a terrible BC break for existing code Previous Comments: ------------------------------------------------------------------------ [2018-05-05 20:52:42] requinix@php.net I've literally never heard of anyone complaining about this before. ------------------------------------------------------------------------ [2011-02-23 13:23:07] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=54078&edit=1

« previous php.bugs (#215098) next »