---
title: find_ancestor_tag
---

```php
find_ancestor_tag ( string $tag ) : object
```

| Parameter | Description
| --------- | -----------
| `tag`     | Tag name of the element to find.

Returns the first matching node that matches the specified tag name or null if no match was found.