Check the validity of a function call.

@param String $text
the name of the function.
173948
private function _processFunctionCall($text) {
		if (strtolower($text) === "define") {
			$this->_constantDef = true;
		}

		if ($this->tokenizer->checkNextValidToken(T_PARENTHESIS_OPEN)) {
			// ASSUMPTION:that T_STRING followed by "(" is a function call
			$this->_inFuncCall = true;

			array_push($this->_currentFuncCall, $text);

			// Add the function name to the list of used functions
			$this->_usedFunctions[$text] = $text;

			// Check if the function call is made on an object of if it's a base PHP function.
			$isObjectCall = $this->tokenizer->checkPreviousToken(T_OBJECT_OPERATOR);

			if (!$isObjectCall) {

				// Detect prohibited functions
				$this->_checkProhibitedFunctions($text);

				// Detect deprecated functions
				$this->_checkDeprecation($text);

				// Detect aliased functions
				$this->_checkAliases($text);

				// Detect replaced functions
				$this->_checkReplacements($text);
			}

			// Detect an @ before the function call
			$this->_checkSilenced($text);

			// Detect space after function name
			if ($this->_isActive('noSpaceAfterFunctionName')) {
				if (!$this->tokenizer->checkNextToken(T_PARENTHESIS_OPEN)) {
					$msg = $this->_getMessage('NO_SPACE_AFTER_TOKEN', $text);
					$this->_writeError('noSpaceAfterFunctionName', $msg);
				}
			}
		}

		// Optimisation : Avoid using count/sizeof inside a loop
		if ($this->_isActive('functionInsideLoop')) {
			if ((strtolower($text) === 'count' || strtolower($text) === 'sizeof') && $this->_inControlStatement) {
				$loops = array(
					'do',
					'while',
					'for',
					'foreach'
				);
				if (in_array($this->_currentStatement, $loops)) {
					$msg = $this->_getMessage('FUNCTION_INSIDE_LOOP', strtolower($text));
					$this->_writeError('functionInsideLoop', $msg);
				}
			}
		}
	}
459347
function check($text)
    {
        $this->init();

        if (!$this->plink) {
            return array();
        }

        // tokenize
        $text = preg_split($this->separator, $text, NULL, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);

        $diff       = 0;
        $matches    = array();

        foreach ($text as $w) {
            $word = trim($w[0]);
            $pos  = $w[1] - $diff;
            $len  = mb_strlen($word);

            // skip exceptions
            if ($this->dictionary->is_exception($word)) {
            }
            else if (!pspell_check($this->plink, $word)) {
                $suggestions = pspell_suggest($this->plink, $word);

                if (count($suggestions) > self::MAX_SUGGESTIONS) {
                    $suggestions = array_slice($suggestions, 0, self::MAX_SUGGESTIONS);
                }

                $matches[] = array($word, $pos, $len, null, $suggestions);
            }

            $diff += (strlen($word) - $len);
        }

        $this->matches = $matches;
        return $matches;
    }
299708
protected function info($text)
    {
        if($this->console) {
            $this->console->info($text);
        }

        if($this->logger) {
            $this->logger->info($text);
        }
    }
1119021
public function setText($text) {
		if( !is_string($text) ) {
			throw new \Exception('RequireStringParameter');
		}
		$this->setTEXTBody(strip_tags($text));
		$this->setHTMLBody(nl2br($text));
	}
375925
public function blacklist($text)
    {
        // No blacklist regex then there isn't much to do
        if ($this->blackListRegex === null) {
            return false;
        }

        // Normalize string before passing
        $text = $this->prepare($text);

        // Look for matches
        return preg_match($this->blackListRegex, $text) > 0;
    }
1117137
private function addTranslatable($text)
    {
        if (strlen($text) > 1 && !isset($this->translatables[$text])) {
            $this->translatables[$text] = '';
        }
    }
957047
protected static function strlen($text) 
    {
        $exits = (function_exists('mb_strlen') && ((int) ini_get('mbstring.func_overload')) & 2);

        return $exits ? mb_strlen($text,'8bit') : strlen($text);
    }
846211
public function setTextBody($text) {
    if (!is_string($text)) {
      $error = sprintf("Plain text given is not a string (Actual type: %s).",
                       gettype($text));
      throw new \InvalidArgumentException($error);
    }
    $this->message->setTextbody($text);
  }
1283465
public function lookup($text)
    {
        $url = $this->getLookupUrl($text);
        $response = $this->sendRequest(
            'GET',
            $url,
            [
                'version' => $this->serviceProtocolVersion
            ]
        );
        if ($response->getStatusCode() === 200) {
            $definitions = $this->parseLookupResponse($response);
            return $definitions;
        }
        return false;
    }
1348162
private function MatchText( $text )
	{
		for ( $k = 0; $k < strlen( $text ); $k++ )
		{
			$ch = $this->Peek( $k );
			if ( $ch == 0 || $ch != $text[ $k ] )
				return false;
		}
		for ( $k = 0; $k < strlen( $text ); $k++ )
			$this->Read();
		return true;
	}
163161
public static function date($text)
	{
	    if(!preg_match("/^([\\d]+)[\\-\\/]([\\d]{1,2})[\\-\\/]([\\d]{1,2})$/", $text, $match)) {
	        return false;
	    }

	    list($_, $year, $month, $day) = $match;

	    // 001
	    if (strlen($month) > 2 || strlen($day) > 2) {
	        return false;
	    }

	    if (!checkdate($month, $day, $year)) {
	        return false;
	    }

	    return true;
	}
1192910
public function iWaitUntilISeeText($text){
        $page = $this->getSession()->getPage();
        $session = $this->getSession();
        $this->spin(function($page) use ($page, $session, $text) {
            $element = $page->find(
                'xpath',
                $session->getSelectorsHandler()->selectorToXpath("xpath", ".//*[contains(text(), '$text')]")
            );

            if(empty($element)) {
                return false;
            } else {
                return ($element->isVisible());
            }
        });
    }
840773
public static function translate($text)
    {
        $args = func_get_args();
        unset($args[0]);
        
        if (isset(self::$messages[$text])) {
            $text = self::$messages[$text];
        }
        
        return vsprintf($text, $args);
    }
1202186
def _check_validity(cls, text):
        

        if not text[0].lstrip().startswith('1 ') or not text[1].lstrip().startswith('2 '):
            raise ValueError("Line number check failed")

        for line in text:
            line = line.strip()
            if str(cls._checksum(line)) != line[-1]:
                raise ValueError("Checksum validation failed")
1244707
public function confirm(string $text, string $default = 'y'): bool
    {
        $choice = $this->choice($text, ['y', 'n'], $default, false);

        return \strtolower($choice[0] ?? $default) === 'y';
    }
800342
protected function error($text)
    {
        if($this->console) {
            $this->console->error($text);
        }

        if($this->logger) {
            $this->logger->error($text);
        }
    }
721620
public function responseContains($text)
    {
        $actual = $this->session->getPage()->getContent();
        $message = sprintf('The string "%s" was not found anywhere in the HTML response of the current page.', $text);

        $this->assert(stripos($actual, $text) !== false, $message);
    }