What function can be used to test characters in a string in PHP?
To test characters in a string in PHP, you can use the `strpos()` function. This function allows you to check if a specific character or substring exists within a given string. If the character is found, `strpos()` will return the position of the character in the string, otherwise it will return false.
$string = "Hello World";
$character = "o";
if (strpos($string, $character) !== false) {
echo "The character '$character' was found in the string.";
} else {
echo "The character '$character' was not found in the string.";
}