M. Sokolewicz wrote:
Jochem Maas wrote:
Paul Barry wrote:
..
Then I have another class:
this is wrong. you can define the property in the class
with a constant or scalar value (i.e. literal string,
numeric value or an array) but not a return value of a
function or a 'new' object.
jus
Jochem Maas wrote:
Paul Barry wrote:
..
Then I have another class:
this is wrong. you can define the property in the class
with a constant or scalar value (i.e. literal string,
numeric value or an array) but not a return value of a
function or a 'new' object.
just to nag, an array is not
Paul Barry wrote:
..
Then I have another class:
this is wrong. you can define the property in the class
with a constant or scalar value (i.e. literal string,
numeric value or an array) but not a return value of a
function or a 'new' object.
you should initialize the $address property in th
On Fri, April 21, 2006 2:17 pm, Paul Barry wrote:
> public $address = new Address();
I believe this is true:
At this time, you can only initialize class properties to CONSTANTS.
So you could use 'Address' or 42 or NULL or TRUE/FALSE, but not new
Address();
Actually, I think an array might a
With php5, I'm trying to create an object that has a property that is
another object. First I have this class:
Then I have another class:
Then if I try to use the user object like this:
name = 'Paul Barry';
$user->address->city = 'Washington';
?>
name ?> lives in address->city ?>
I get th
5 matches
Mail list logo