# `Countable` Interface and Internal Classes

> Section in “New and Extended Functionality › Language Features” of the book [PHP 7 Explained](https://php7explained.com/) by Sebastian Bergmann and Stefan Priebsch, published by thePHP.cc. The book covers PHP 7.0 to 7.4 and was last updated in November 2020. HTML version: <https://php7explained.com/new-and-extended-functionality/language-features/countable-interface-and-internal-classes/>

The internal classes `DOMNamedNodeMap`, `DOMNodeList`, and `ZipArchive` now implement the `Countable` interface. Objects of these classes can now be used with the `count()` function.

---

Previous: [Group Use Declarations](https://php7explained.com/new-and-extended-functionality/language-features/group-use-declarations/index.html.md) | Next: [is_countable()](https://php7explained.com/new-and-extended-functionality/language-features/is_countable/index.html.md)
