<?php class test { protected $container; function __get($name) { if ($name === 'container') { $a = new stdClass(); $a->test = random_bytes(7); return $a; } } function __set($name, $value) { if ($name === 'container') { } } function blah() { $this->container = 'test'; } } $a =new test(); var_dump($a->container); var_dump($a->container); var_dump($a->container); $a->blah(); var_dump($a->container);
You have javascript disabled. You will not be able to edit any code.