<?php class MyObj { public $member = 'sad'; public function setMember($emotion) { $this->member = $emotion; return $this->member; } } $obj = (new MyObj())->setMember('happy'); var_dump($obj);
You have javascript disabled. You will not be able to edit any code.