defined() function
Definition and usage
defined() function checks whether a constant exists.
If the constant exists, return true, otherwise return false.
Example:
define("GREETING","Hello world!");
echo defined("GREETING");
?> ;
Output:
1
strrchr() function
Definition and Usage
The strrchr() function finds the last occurrence of a string in another string and returns all characters from that position to the end of the string.
If it fails, return false otherwise.
Syntax
strrchr(string,char)
Parameter Description
string Required. Specifies the string to be searched for.
char required. Specifies the characters to search for. If the argument is a number, searches for characters matching the numeric ASCII value.
Example 1
echo strrchr("Hello world!","world");
?>
Output:
world !
Example 2
echo strrchr("Hello world!",111);
?>
Output:
orld!