Created
March 26, 2014 15:42
-
-
Save ovcharenkovv/9786306 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 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