I don't really know what to google, as I have kind of picked up PHP and OOP without knowing the jargon.
Why doesn't this work in PHP?
class Calendar{
public $derp="lala";
public $todaysDate=date('Y-m-d',strtotime('2013-04-11'));
}
But this does?
class Calendar{
public $derp="lala";
public function __construct()
{
$this->todaysDate=date('Y-m-d',strtotime('2013-04-11'));
}
}
You can't declare a date at the beginning of a class? Why?