I learn PHP and I have problem:
<?php
class ProtectVis
{
abstract protected function countMoney();
protected $wage;
protected function setHourly($hourly)
{
$money = $hourly;
return $money;
}
}
class ConcreteProtect extends ProtectVis
{
function __construct()
{
$this->countMoney();
}
protected function countMoney()
{
echo "ok";
}
}
$worker = new ConcreteProtect();
Now I have error:
Fatal error: Class ProtectVis contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ProtectVis::countMoney) in
Why?