Last active
January 28, 2017 21:55
-
-
Save cyrilletuzi/ff639f478801c009450c5690755b0066 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class User { | |
private $firstName; | |
public function getFirstName() { | |
return $this->firstName; | |
} | |
public function setFirstName($newFirstName) { | |
$this->firstName = $newFirstName; | |
} | |
} | |
$myUser = new User('Henri'); | |
$myUser->getFirstName(); | |
$myUser->setFirstName('New name'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment