fork download
  1. <?php
  2.  
  3. class Foo {
  4.  
  5. public function __construct($name) {
  6. $this->name = $name;
  7. }
  8.  
  9. public function __toString() {
  10. return "classe Foo";
  11. }
  12.  
  13. }
  14.  
  15. function getCategoria() {
  16. return "categoria";
  17. }
  18.  
  19. $l1 = new Foo("lutador 1");
  20. $l2 = new Foo("lutador 2");
  21.  
  22. var_dump($l1.getCategoria() == $l2.getCategoria());
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
bool(true)