what in holy hell is "self::" v. php5

Discussion in 'OT Technology' started by babygodzilla, Sep 7, 2007.

  1. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    as the subject states, WHAT is

    self::$variable

    i dont get it. is that like $this->? what is the difference?
     
  2. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
  3. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    hmm ok so self:: is used to access static members. what else is it used for?

    and actually, since i already mentioned $this, when do you have to use $this? in what situation is $this used for?

    for some reason searching for "php $this" doesnt reveal anything useful in google.
     
  4. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    http://ca3.php.net/manual/en/language.oop5.basic.php

    Read the entire OOP section.
     

Share This Page