original_string: protected function recursive_get_all_children($classname, array &$result) {
          foreach ($this->children as $child) {
              if (is_a($child, $classname)) {
                  $result[] = $child;
              }
              if ($child instanceof tree) {
                  $child->recursive_get_all_children($classname, $result);
              }
          }
      }
code: protected function recursive_get_all_children($classname, array &$result) {
          foreach ($this->children as $child) {
              if (is_a($child, $classname)) {
                  $result[] = $child;
              }
              if ($child instanceof tree) {
                  $child->recursive_get_all_children($classname, $result);
              }
          }
      }
code_tokens: protected function recursive_get_all_children ( $ classname , array & $ result ) { foreach ( $ this -> children as $ child ) { if ( is_a ( $ child , $ classname ) ) { $ result [ ] = $ child ; } if ( $ child instanceof tree ) { $ child -> recursive_get_all_children ( $ classname , $ result ) ; } } }
docstring: Internal function that implements get_all_children efficiently.
  
  @param string $classname Full class name e.g. core_availability\condition
  @param array $result Output array of nodes
docstring_tokens: Internal function that implements get_all_children efficiently .