In PHP 8, what function can be used to check if a string starts with a specific character?

To check if a string starts with a specific character in PHP 8, you can use the `str_starts_with()` function. This function takes two parameters: the string to check and the character to check for at the beginning of the string. It returns a boolean value, true if the string starts with the specified character, and false otherwise.

$string = "hello world";
$character = "h";

if (str_starts_with($string, $character)) {
    echo "The string starts with the character '$character'";
} else {
    echo "The string does not start with the character '$character'";
}