class hydra {
var $dbcon;
function __construct($ezSQL){
$this -> dbcon=$ezSQL;
}
}
class user extends hydra{
function foo(){
echo "bar is: ".$this->dbcon;
}
}
I then call:
$hydra = new hydra($ezSQL);
However, at this point I get the following error:
Fatal error: Cannot instantiate abstract class hydra
How do set up a class that will inherit all of it's children's functions so I can do something like this:
$hydra = new hydra("foobar");
$hydra -> foo();
output:
bar is: foobar