logo

Crowdly

A kimenet teszt lesz. class A {     private $data = [];     public funct...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

A kimenet teszt lesz.

class A {

    private $data = [];

    public function __set($name, $value) {

        $this->data[$name] = $value;

    }

    public function __get($name) {

        return $this->data[$name] ?? null;

    }

}

$a = new A();

$a->valami = "teszt";

echo $a->valami;

0%
0%
More questions like this

Want instant access to all verified answers on moodle.njszki.hu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!