PHP 8.4.2 Released!

Dom\TokenList::supports

(PHP 8 >= 8.4.0)

Dom\TokenList::supportsReturns whether the given token is supported

说明

public Dom\TokenList::supports(string $token): bool

Returns whether token is in the associated attribute's supported tokens.

参数

token
The token.

返回值

成功时返回 true, 或者在失败时返回 false

错误/异常

Throws a TypeError when the attribute does not define a supported tokens list.

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top