Skip to content

Instantly share code, notes, and snippets.



Created Feb 12, 2019
What would you like to do?
OOP basics
require 'Person.php';
$pesho = new Person;
$ivan = new Person;
class Person
protected $hairColor;
protected $eyeColor;
public function run()
echo 'running';
public function setHairColor($color)
$this->hairColor = $color;
public function printHairColor()
echo $this->hairColor;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment