PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php class A { protected \stdClass $x; public function __construct() { $this->reset(); } public function getX() { return $this->x; } public function reset() { $this->x = new stdClass(); } } $a = new A(); $test = $a->getX(); echo spl_object_hash($test) . "\n"; $a->reset(); echo spl_object_hash($test);
Show:  
Copy Clear