$element->attr()
The returns the attribute value or the given fallback if the attribute does not exist
$element->attr(string $attr, string $fallback = null): string|null
Parameters
Name | Type | Default |
---|---|---|
$attr * | string |
– |
$fallback | string |
null |
Return type
string
|null