I think this is a really, really simple question but I can't seem to find the answer.
I'm trying to set default values for properties in a PHP class and one of them is a date so I'm trying to use the date() function to set it:
<?php
class Person
{
public $fname = "";
public $lname = "";
public $bdate = date("c");
public $experience = 0;
}
?>
I'm getting an error in Zend Studio that on the public $bdate line that says
PHP Parse error: syntax error, unexpected '(', expecting ',' or ';'
I've looked through a bunch of documentation on the various date classes in PHP and the Class/Properties documentation but I can't find any examples of setting a date value to a property. I've tried mktime() and some of the other date classes but I always get the same error.
How do you set a date value to a property in PHP?