Easy Tutorial
❮ Func Error Log Func Array Udiff ❯

PHP stripos() Function

PHP String Reference Manual

Example

Find the first occurrence of "php" in the string:


Definition and Usage

The stripos() function finds the position of the first occurrence of a string within another string (case-insensitive).

Note: The stripos() function is case-insensitive.

Note: This function is binary-safe.

Related functions:


Syntax

Parameter Description
string Required. Specifies the string to search in.
find Required. Specifies the string to find.
start Optional. Specifies the position to start the search from.

Technical Details

Return Value: Returns the position of the first occurrence of a string within another string, or FALSE if the string is not found. Note: String positions start at 0, not 1.
PHP Version: 5+
--- ---

❮ Func Error Log Func Array Udiff ❯