Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Last active January 28, 2017 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyrilletuzi/ff639f478801c009450c5690755b0066 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/ff639f478801c009450c5690755b0066 to your computer and use it in GitHub Desktop.
<?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