username = $username; $this->password = $password; } public function getPassword() { return str_repeat('*', strlen($this->password)); } } $a = new account('brandizzi', 'MySecretPassword'); echo $a->getPassword() . "\n"; echo $a->password . "\n";