$this variable help.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Please can someone point me to where the $this variable is discussed in the  
PHP manual. Done a search of the online manual and the results don't cover  

I use it in ignorance and would like to more. Doesn't even have to be  
official PHP sources as long it's accurate.

Many thanks.



Re: $this variable help.

Phil Latio wrote:

Quoted text here. Click to load it


Start here:

In short: $this references to the instantion of a class.
If that doesn't make too much sense, first read through the chapters on  
If you want to REALLY learn OOP (Object Oriented Programming) you must find  
a good book. (You can ask in here for tips, or browse though the group  
because that question is asked many times before.)

Please note that PHP5 has better support for OOP than PHP4 had.

Erwin Moller

Re: $this variable help.

A book that I recommend is: PHP 5 Objects, Patterns, and Practice by
Matt Zandstra published by Apress (A expert's Voice in Open Source)

It covers all the new PHP 5 OOP. It's also a fun read.

Erwin Moller wrote:
Quoted text here. Click to load it

Site Timeline