ID:               37088
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bugzilla at yakasha dot net
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
-Operating System: all
+Operating System: *
-PHP Version:      5.1.3RC2
+PHP Version:      *
 New Comment:

Use a decent IDE then.


Previous Comments:
------------------------------------------------------------------------

[2006-04-14 19:34:51] bugzilla at yakasha dot net

Description:
------------
Please universalize the argument ordering for search functions like
strstr & in_array.  It's annoying to have to constantly second guess
myself, "Which uses needle/haystack and which is haystack/needle"

Reproduce code:
---------------
<?php
$needle      = "what";
$haystack    = "Is what you're looking for in here?";

$stringFound = strstr($needle, $haystack);

$haystack    = explode(" ", $haystack);
$arrayFound  = in_array($needle, $haystack);

echo "String: " . ($stringFound ? "found\n" : "not found\n");
echo "Array:  " . ($arrayFound  ? "found\n" : "not found\n");
?>

Expected result:
----------------
String: found
Array:  found

Actual result:
--------------
String: not found
Array:  found


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37088&edit=1

Reply via email to