protected function varInUse(array $tokens, $closeTagIndex, $variable) {
		if ($variable === '$this') {
			return false;
		}

		$i = $closeTagIndex + 1;
		while (isset($tokens[$i])) {
			if ($tokens[$i]['code'] === T_VARIABLE && $tokens[$i]['content'] === $variable) {
				return true;
			}
			$i++;
		}

		return false;
	}
protected function varInUse(array $tokens, $closeTagIndex, $variable) {
		if ($variable === '$this') {
			return false;
		}

		$i = $closeTagIndex + 1;
		while (isset($tokens[$i])) {
			if ($tokens[$i]['code'] === T_VARIABLE && $tokens[$i]['content'] === $variable) {
				return true;
			}
			$i++;
		}

		return false;
	}
protected function varInUse ( array $ tokens , $ closeTagIndex , $ variable ) { if ( $ variable === '$this' ) { return false ; } $ i = $ closeTagIndex + 1 ; while ( isset ( $ tokens [ $ i ] ) ) { if ( $ tokens [ $ i ] [ 'code' ] === T_VARIABLE && $ tokens [ $ i ] [ 'content' ] === $ variable ) { return true ; } $ i ++ ; } return false ; }
Checks the var token for existence.

T_VARIABLE ..., content=`$variable`

@param array $tokens
@param int $closeTagIndex
@param string $variable

@return bool
Checks the var token for existence .