if i have a class that has a index function and i extend it and create another index function. Will the index function in the extension overwrite the parents index function? also, what is parent::__construct() exactly doing in the second class in a construct?
class someclass
{
public function index()
{
//do something
}
}
class newclass extends someclass
{
function __construct()
{
parent::__construct();
}
public function index()
{
//do something
}
}
You can just do some simple test
Output
Classes