Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Dom\TokenList::replaceDom\TokenList::toggle>
^Dom\TokenListLast updated: Mon, 26 Oct 2026

Dom\TokenList::supports

(PHP 8 >= 8.4.0)

Dom\TokenList::supports — Returns whether the given token is supported

Description

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

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

Parameters

token

The token.

Return Values

Returns true on success or false on failure.

Errors/Exceptions

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


<Dom\TokenList::replaceDom\TokenList::toggle>
^Dom\TokenListLast updated: Mon, 26 Oct 2026