Inheritance and except some attribute in OOP php?
I HAVE CLASS A
class A{
var a;
var b;
var c;
var d;
function todo1()
{
//more code here
}
function todo2()
{
//more code here
}
function todo_with_var_c()
{
//more code here
}
}
$A_ = new A;
I want get a new object $B
the same object of A
but except var c
todo_with_var_c
So I tried with inheritance in php
class B extends A{
//TODO
}
$B_ = new $B;//$B_ will the same object $A_ but except `var c`
and and `todo_with_var_c`
How Can I do it? thanks!