src/Utilities/Regex.php
public static function isValidPhoneNumber($phoneNumber)
    {
        /*
         * Not a string?
         * Nothing to do
         */
        if (!is_string($phoneNumber)) {
            return false;
        }

        $pattern = self::getPhoneNumberPattern();

        return (bool)preg_match($pattern, trim($phoneNumber));
    }
public static function isValidPhoneNumber($phoneNumber)
    {
        /*
         * Not a string?
         * Nothing to do
         */
        if (!is_string($phoneNumber)) {
            return false;
        }

        $pattern = self::getPhoneNumberPattern();

        return (bool)preg_match($pattern, trim($phoneNumber));
    }
public static function isValidPhoneNumber ( $ phoneNumber ) { /*
         * Not a string?
         * Nothing to do
         */ if ( ! is_string ( $ phoneNumber ) ) { return false ; } $ pattern = self :: getPhoneNumberPattern ( ) ; return ( bool ) preg_match ( $ pattern , trim ( $ phoneNumber ) ) ; }
Returns information if given phone number is valid

@param string $phoneNumber The phone number to validate / verify
@return bool
Returns information if given phone number is valid