<?php

class A {
	public $name='ahmed';
	private $name2='khaled';
	protected $name3='mohammed';
}

class B extends A {
	public function test(){
		echo $this->name;
		echo "<br>";
		//echo $this->name2;
		echo $this->name3;
	}
}

$obj=new B();
echo $obj->test();
echo "<br>";
echo $obj->name;
?>