Skip to content

Instantly share code, notes, and snippets.

@ovcharenkovv
Created March 26, 2014 15:42
Show Gist options
  • Save ovcharenkovv/9786306 to your computer and use it in GitHub Desktop.
Save ovcharenkovv/9786306 to your computer and use it in GitHub Desktop.
<?php
class Father {
private $fProperty;
public function setProp($fProperty) {
$this->fProperty = $fProperty;
return $this;
}
}
class Child extends Father {
}
$father = new Father();
$father->setProp('fatherprop');
var_dump($father);
$child = new Child();
var_dump($child);
$child->setProp('chprop');
var_dump($child);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment