Function __global->__check_tag
Definitions
sources/webstandards2.php
- Checks an XHTML tag for conformance, including attributes. Return the results.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $tag | string | No | No | required parameter | N/A | N/A | The name of the tag to check |
| $attributes | array | No | No | required parameter | N/A | N/A | A map of attributes (name=>value) the tag has |
| $self_close | boolean | No | No | required parameter | N/A | N/A | Whether this is a self-closing tag |
| $close | boolean | No | No | required parameter | N/A | N/A | Whether this is a closing tag |
| $errors | array | No | No | required parameter | N/A | N/A | Errors detected so far. We will add to these and return |
Returns
- List of errors
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Checks an XHTML tag for conformance, including attributes. Return the results.
*
* @param string $tag The name of the tag to check
* @param array $attributes A map of attributes (name=>value) the tag has
* @param boolean $self_close Whether this is a self-closing tag
* @param boolean $close Whether this is a closing tag
* @param array $errors Errors detected so far. We will add to these and return
* @return array List of errors
*/
function __check_tag(string $tag, array $attributes, bool $self_close, bool $close, array $errors) : array
* Checks an XHTML tag for conformance, including attributes. Return the results.
*
* @param string $tag The name of the tag to check
* @param array $attributes A map of attributes (name=>value) the tag has
* @param boolean $self_close Whether this is a self-closing tag
* @param boolean $close Whether this is a closing tag
* @param array $errors Errors detected so far. We will add to these and return
* @return array List of errors
*/
function __check_tag(string $tag, array $attributes, bool $self_close, bool $close, array $errors) : array

