Jump to content


Photo

'this->' vs 'self::'


  • Please log in to reply
1 reply to this topic

#1 sneskid

sneskid
  • Members
  • PipPipPip
  • Advanced Member
  • 38 posts

Posted 02 August 2006 - 04:49 AM

i've read that using the self keyword can have a drawback when classes inherit other.
does using the 'this' keyword work around that?

what is the main difference between the 2.

thanks

#2 bilis_money

bilis_money
  • Members
  • PipPipPip
  • Advanced Member
  • 621 posts

Posted 02 August 2006 - 06:56 AM

this-> is for class //calling the function, variable inside a class only.
while phpself //calling itself and not a class.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users