I fiddled around with using `array_map()` or `array_walk()`. They do not simplify the code - primarily because `getElementsByTagName` does not return an array but a `DOMNodeList`.