Are there alternative methods to casting null values to strings in PHP 8.1?

In PHP 8.1, a new method called `str_contains` has been introduced to check if a string contains another string. To cast null values to strings in PHP 8.1, you can use the null coalescing operator (`??`) to provide a default value if the variable is null.

// Using the null coalescing operator to cast null values to strings
$variable = null;
$stringValue = $variable ?? 'default_value';
echo $stringValue;