ID:               13730
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Closed
 Bug Type:         Feature/Change Request
 Operating System: Linux/Red Hat 7.1
 PHP Version:      4.0.6
 New Comment:

Also this behavior is documented.


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

[2003-01-18 12:49:34] [EMAIL PROTECTED]

 Even though PHP is loosed type language there is === operator for
checking the types as well the values. If the developer is lazy to
write !== FALSE then he/she can get the flames after that because
he/she deserves them. This will break BC and won't be implemented. 
Regarding the "one based" string position. PHP is like C, not Pascal.

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

[2002-02-19 14:18:24] [EMAIL PROTECTED]

Or make the string position one based instead of zero based so that a
return of 0 can be used for false and any other return is true. 
strstr() can usually be used that way, but seems to get confused
looking for "/".

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

[2001-10-18 05:42:03] [EMAIL PROTECTED]

re StrPOS, I suggest that you do the following.

Make another function with a different name, e.g. StrFind, that is
1) less problematic in distinguishing between found at pos zero and not
found. e.g. return -1 for not found.
2) case-insensitive, or (better) has an optional parameter
($casesensitive = false) that defaults to false

You could also roll in last-occurence functionality a la strrpos with
option flags

After this, mark the StrPos function as obsolete/deprecated.


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


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

Reply via email to