|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-12 00:47 UTC] anon at example dot com
[2008-01-12 00:57 UTC] anon at example dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 08:00:01 2025 UTC |
Description: ------------ What we often need to test for is just whether a substring exists or not. This is very common, for example, in examining a user agent. Currently you have to test for these specific formulations, being very careful to use the strict equivalency operators: strpos === FALSE or strpos !== FALSE It would be handy and much less prone to incorrect syntax use to have a "string exists" function -- maybe as strex or strpres ("string present") -- dedicated to this, which returns only TRUE or FALSE. There could also be a "case sensitive string exists" -- maybe as striex or stripres.