What are the best practices for checking if a string contains a numerical value in PHP?

When checking if a string contains a numerical value in PHP, a common approach is to use the `is_numeric()` function. This function returns true if the given string is a numeric value, including integers and floats. It is a simple and effective way to validate if a string contains a numerical value in PHP.

$string = "12345";
if (is_numeric($string)) {
    echo "The string contains a numerical value.";
} else {
    echo "The string does not contain a numerical value.";
}