79455994

Date: 2025-02-20 22:54:17
Score: 1
Natty:
Report link

Classes that are created in eval() are not the same classes:

function test3($test) {
    return eval("return new class($test) {
        public function __construct(public \$test) {}};"
    );
}
compare(test3(1), test3(1)); // false, false, false,
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: LordF