Back to ImmutableNodeTrait class

Method hasChildren

public bool
hasChildren
()
Test if this node has children
Returns
  • bool True if there is a child
Since
  • 4.0.0

Method hasChildren - Source code

/**
 * Test if this node has children
 *
 * @return  boolean  True if there is a child
 *
 * @since   4.0.0
 */
public function hasChildren()
{
    return (bool) \count($this->_children);
}