RE: [PHP] how and when to use ->
| From: | Daevid Vincent | Date: | Wed, 10 Dec 2003 21:31:30 +0000 |
| Subject: | RE: [PHP] how and when to use -> | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172386@lists.php.net to get a copy of this message | ||
-> is for classes / objects...
It points to a variable in the object class (this case $path) or
a function like $d->setColor("green");
http://us4.php.net/manual/en/language.oop.php
OOP is hella cool when you "get it". But it can also be overkill for many
things too. Basically I think of it this way, if I need to store 'records'
like with a database, but don't need a database per se, OOP is perfect. For
a great example, I would refer you to my simple DHCP web page project:
http://daevid.com/examples/dhcp/ you can download the
.tgz file at the
bottom and see how it's structured.
Daevid Vincent
http://daevid.com
> -----Original Message-----
> From: Dave Reinhardt [mailto:php-net@SeaPort6.com]
> Sent: Wednesday, December 10, 2003 1:26 PM
> To: php-general@lists.php.net
> Subject: [PHP] how and when to use ->
>
> how and when to use -> as in
> echo "Path: ".$d->path."<br>\n";
> what does this mean and how is it used?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>