stripos

Description

A case-insensitive version of strpos (same as the PHP5 function).

Syntax

int stripos (string $haystack, string $needle[, int $offset])



Parameter $haystack

Expected type: String
Description: The string to search



Parameter $needle

Expected type: String
Description: The string to search for



Parameter $offset

Expected type: Integer
Description: The position within the string that we should start the search at (used when you want to search a specific part of a string)



Return value

Expected type: Integer
Description: Position within a string where the first occurrence of this character was found


Notes

  • Functions exactly like the PHP5 function of the same name
  • Only declared if the function doesn't already exist
  • Allows us to use the functionality of stripos regardless of the PHP version
Advertisement: