Ad
  • Custom User Avatar

    The fact that objects have no attributs does not mean that they do not differ in any way form each other. They are different nodes, and you can easily check if they are the same, or different node.

    The fact that nodes have no readable property does not make the kata broken.

  • Custom User Avatar

    It's broken in php. $node->next() returns only the same object, which has nothing in it except the next method. Literally. What should I do with it if the objects don't even differ from each other in any way and it falls into an endless cycle?

      var_dump(get_object_vars($node));
      var_dump(serialize($node));
      $b = $node->getNext();
      var_dump(get_object_vars($b));
      var_dump(serialize($b));
    
    array(0) {
    }
    string(33) "O:4:"Node":1:{s:7:"*next";r:1;}"
    array(0) {
    }
    string(33) "O:4:"Node":1:{s:7:"*next";r:1;}"