substr_compare

(PHP 5, PHP 7) Binary safe comparison of two strings from an offset, up to length characters int substr_compare ( string $main_str, string $str, int $offset [, int $length [, bool $case_insensitivity = false ]] ) substr_compare() compares main_str from position offset with str up to length characters. Parameters: main_str The main string being compared.

strtr

(PHP 4, PHP 5, PHP 7) Translate characters or replace substrings string strtr ( string $str, string $from, string $to ) string strtr ( string $str , array $replace_pairs ) If given three arguments, this function returns a copy of str where all occurrences of each (single-byte) character in from have been translated to the corresponding character in to, i.e., every occurrence of $from[$n] has been replaced with $to[$n], wher

strtoupper

(PHP 4, PHP 5, PHP 7) Make a string uppercase string strtoupper ( string $string ) Returns string with all alphabetic characters converted to uppercase. Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (ä) will not be converted. Parameters: string The input string. Returns

strtolower

(PHP 4, PHP 5, PHP 7) Make a string lowercase string strtolower ( string $string ) Returns string with all alphabetic characters converted to lowercase. Note that 'alphabetic' is determined by the current locale. This means that e.g. in the default "C" locale, characters such as umlaut-A (Ä) will not be converted. Parameters: string The input string.

strtok

(PHP 4, PHP 5, PHP 7) Tokenize string string strtok ( string $str, string $token ) string strtok ( string $token ) strtok() splits a string (str) into smaller strings (tokens), with each token being delimited by any character from token. That is, if you have a string like "This is an example string" you could tokenize this string into its individual words by using the space character as the token. Note that only the first

strstr

(PHP 4, PHP 5, PHP 7) Find the first occurrence of a string string strstr ( string $haystack, mixed $needle [, bool $before_needle = false ] ) Returns part of haystack string starting from and including the first occurrence of needle to the end of haystack. Note: This function is case-sensitive. For case-insensitive searches, use stristr(). Note: If you only want to determine if a particular needle occurs within ha

strspn

(PHP 4, PHP 5, PHP 7) Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask. int strspn ( string $subject, string $mask [, int $start [, int $length ]] ) Finds the length of the initial segment of subject that contains only characters from mask. If start and length are omitted, then all of subject will be examined. If they are included, then the effect will be

strrpos

(PHP 4, PHP 5, PHP 7) Find the position of the last occurrence of a substring in a string int strrpos ( string $haystack, string $needle [, int $offset = 0 ] ) Find the numeric position of the last occurrence of needle in the haystack string. Parameters: haystack The string to search in. needle If needle is not a string, it is converte

strripos

(PHP 5, PHP 7) Find the position of the last occurrence of a case-insensitive substring in a string int strripos ( string $haystack, string $needle [, int $offset = 0 ] ) Find the numeric position of the last occurrence of needle in the haystack string. Unlike the strrpos(), strripos() is case-insensitive. Parameters: haystack The string to search in.

strrev

(PHP 4, PHP 5, PHP 7) Reverse a string string strrev ( string $string ) Returns string, reversed. Parameters: string The string to be reversed. Returns: Returns the reversed string. Examples: Reversing a string with strrev() <?php echo strrev("Hello world!"); // outpu