I'm trying to get this result on my php code, I need the implementation of
class person
$person = new person();
$person->setFirstName('name')
->setLastName('lastname')
->setEmail('email@example.com')
;
echo $user;
and then i have this result Will result a string
"name Lastname "
IS the example of my class implementation but it didn't work I need to implement three setters setFirstName,setLastName,setEmail to get my result code above .
class User {
private $FirstName;
private $LastName;
private $Email;
public function getFirstName() {
return $this->FirstName;
}
public function setFirstName($x) {
$this->FirstName = $x;
}
public function getLastName() {
return $this->LastName;
}
public function setLastName($x) {
$this->LastName = $x;
}
public function getEmail() {
return $this->Email;
}
public function setEmail($x ) {
$this->Email = $x;
}
}