public static function matchToken($pattern, $token) {
		if ($pattern['name'] !== $token['name']) {
			return false;
		}

		if (!isset($pattern['content'])) {
			return true;
		}

		$match = $pattern['content'];
		$content = $token['content'];

		if ($pattern['name'] === 'T_VARIABLE') {
			$match = substr($match, 1);
			$content = substr($content, 1);
		}

		switch (true) {
			case ($match === '_' || $match === $content):
				return true;
		}
		return false;
	}
public static function matchToken($pattern, $token) {
		if ($pattern['name'] !== $token['name']) {
			return false;
		}

		if (!isset($pattern['content'])) {
			return true;
		}

		$match = $pattern['content'];
		$content = $token['content'];

		if ($pattern['name'] === 'T_VARIABLE') {
			$match = substr($match, 1);
			$content = substr($content, 1);
		}

		switch (true) {
			case ($match === '_' || $match === $content):
				return true;
		}
		return false;
	}
public static function matchToken ( $ pattern , $ token ) { if ( $ pattern [ 'name' ] !== $ token [ 'name' ] ) { return false ; } if ( ! isset ( $ pattern [ 'content' ] ) ) { return true ; } $ match = $ pattern [ 'content' ] ; $ content = $ token [ 'content' ] ; if ( $ pattern [ 'name' ] === 'T_VARIABLE' ) { $ match = substr ( $ match , 1 ) ; $ content = substr ( $ content , 1 ) ; } switch ( true ) { case ( $ match === '_' || $ match === $ content ) : return true ; } return false ; }
Compares two PHP language tokens.

@param array $pattern Pattern token.
@param array $token Token to be compared.
@return boolean Match result.
Compares two PHP language tokens .