src/Nodes/NodeTrait.php
public function getChildren($filterEmptyDOMText = false)
    {
        $ret = iterator_to_array($this->childNodes);
        if ($filterEmptyDOMText) {
            // Array values is used to discard the key order. Needs to be 0 to whatever without skipping any number
            $ret = array_values(array_filter($ret, function ($node) {
                return $node->nodeName !== '#text' || mb_strlen(trim($node->nodeValue));
            }));
        }

        return $ret;
    }
public function getChildren($filterEmptyDOMText = false)
    {
        $ret = iterator_to_array($this->childNodes);
        if ($filterEmptyDOMText) {
            // Array values is used to discard the key order. Needs to be 0 to whatever without skipping any number
            $ret = array_values(array_filter($ret, function ($node) {
                return $node->nodeName !== '#text' || mb_strlen(trim($node->nodeValue));
            }));
        }

        return $ret;
    }
public function getChildren ( $ filterEmptyDOMText = false ) { $ ret = iterator_to_array ( $ this -> childNodes ) ; if ( $ filterEmptyDOMText ) { // Array values is used to discard the key order. Needs to be 0 to whatever without skipping any number $ ret = array_values ( array_filter ( $ ret , function ( $ node ) { return $ node -> nodeName !== '#text' || mb_strlen ( trim ( $ node -> nodeValue ) ) ; } ) ) ; } return $ ret ; }
Returns the children of the current node.

@param bool $filterEmptyDOMText Filter empty DOMText nodes?

@return array
Returns the children of the current node .