Felipe
Felipe

Reputation: 11887

Another way to reference $this in PHP?

Is there any other way to reference the current object in php other than the usual $this ???

Thank you

p.s.: I was thinking of perhaps a hidden or shorthand form..

Upvotes: 0

Views: 185

Answers (2)

Shaz
Shaz

Reputation: 15867

Sure:

$t = $this

                              

Upvotes: 2

Pascal MARTIN
Pascal MARTIN

Reputation: 400952

No : that's precisely what the special-pseudo-variable $this is for.

Upvotes: 4

Related Questions