obj->attribute = "TEST"; } public function getObj() { return $this->obj; } } $s = new SEGV; //$s->segv(); // if value of obj is set from the inside of class, it will not get SEGV. $s->getObj()->attribute["TEST"] = "TEST"; // member value is set from the outside of class $s->segv(); // this set function will get SEGV $s->segv(); echo "SUCCESS\n"; ?>