Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Parent{
- protected $test='parent';
- public function getTest(){
- return $this->test;
- }
- }
- class Child{
- public function __construct(){
- $this->test = 'child';
- }
- }
- $parent = new Parent();
- var_dump($parent->getTest());
- $child = new Child();
- var_dump($child->getTest());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement