referencing object members

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
antonmabundo
Forum Newbie
Posts: 1
Joined: Thu Dec 18, 2008 12:46 am

referencing object members

Post by antonmabundo »

what is the difference when using the {} in referencing object members:

i would usually do it this way
$object->member;

but i've seen some code doing it this way
$object->{member}

what's the difference? or rather what's the use of the curly brackets {}?
Post Reply