<?php
class Foo {
public function __construct($name) {
$this->name = $name;
}
public function __toString() {
return "classe Foo";
}
}
function getCategoria() {
return "categoria";
}
$l1 = new Foo("lutador 1");
$l2 = new Foo("lutador 2");
var_dump($l1.getCategoria
() == $l2.getCategoria
());
PD9waHAKCmNsYXNzIEZvbyB7CiAgICAKICAgIHB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjdCgkbmFtZSkgewogICAgICAgICR0aGlzLT5uYW1lID0gJG5hbWU7CiAgICB9CiAgICAKICAgIHB1YmxpYyBmdW5jdGlvbiBfX3RvU3RyaW5nKCkgewogICAgICAgIHJldHVybiAiY2xhc3NlIEZvbyI7CiAgICB9CiAgICAKfQoKZnVuY3Rpb24gZ2V0Q2F0ZWdvcmlhKCkgewogICAgcmV0dXJuICJjYXRlZ29yaWEiOwp9CgokbDEgPSBuZXcgRm9vKCJsdXRhZG9yIDEiKTsKJGwyID0gbmV3IEZvbygibHV0YWRvciAyIik7Cgp2YXJfZHVtcCgkbDEuZ2V0Q2F0ZWdvcmlhKCkgPT0gJGwyLmdldENhdGVnb3JpYSgpKTs=