实际上,我的问题是
为什么我们在PHP中使用configs.ini文件?
使用configs.php和configs.ini有什么区别?
使用configs.ini文件的优点是什么?
其实,
这工作正常..但我想要父值.不是孩子的价值..
<?php
class Fruit{
protected $parentproperty = "parentvalue";// this is parent value
}
class Orange extends Fruit{
protected $parentproperty = "child value";// here i mentioned once again
function showParentProperty(){
return self::$this->parentproperty;
}
}
$obj = new Orange;
echo $obj->showParentProperty();
//conclusion:
// i want to get the parent value not child. its working fine . but it's displaying chid value
?>
Run Code Online (Sandbox Code Playgroud)