关于php继承的疑惑
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?phpclass A { [color=#FF0000]private[/color] $name = "Nciaer"; public function say() { echo $this -> name . "<br>"; }}class B extends A { public $name = "Fansa";}$b = new B();$b -> say();?>
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?phpclass A { [color=#FF0000]public[/color] $name = "Nciaer"; public function say() { echo $this -> name . "<br>"; }}class B extends A { public $name = "Fansa";}$b = new B();$b -> say();?>