Re: Symbols used in classes.
- From: Michael Fesser <netizen@xxxxxx>
- Date: Thu, 31 Jul 2008 19:20:22 +0200
..oO(Gerry)
Probably an old quesion, but im pretty new to php, and have not had
great success in searching.
Ive looking over some code which contains the following terms
$this
Refers to the current object, which invoked the method you're in.
->
Used to access non-static members (methods and properties) of an object,
e.g.
$foo = new TFoo();
$foo->somePublicMethod();
(Inside the method somePublicMethod() $this would refer to $foo as the
object that called the method.)
::
Scope resolution operator, used mainly to access static members of a
class, e.g.
TBar::someClassMethod();
print TBar::SOME_CLASS_CONSTANT;
Micha
.
- References:
- Symbols used in classes.
- From: Gerry
- Symbols used in classes.
- Prev by Date: Re: Symbols used in classes.
- Next by Date: create file and write content in same code block
- Previous by thread: Re: Symbols used in classes.
- Next by thread: create file and write content in same code block
- Index(es):
Relevant Pages
|