public static function hasValidLength($value)
    {
        // Sanitize
        $value  = (int) $value;
        $length = strlen($value);

        // Validate
        return !($length < 9 || $length > 13);
    }
public static function hasValidLength($value)
    {
        // Sanitize
        $value  = (int) $value;
        $length = strlen($value);

        // Validate
        return !($length < 9 || $length > 13);
    }
public static function hasValidLength ( $ value ) { // Sanitize $ value = ( int ) $ value ; $ length = strlen ( $ value ) ; // Validate return ! ( $ length < 9 || $ length > 13 ) ; }
Check if length of given ean makes sense.

@param string|int $value ean, upc or isbn13

@return bool
Check if length of given ean makes sense .