Jason Barnett wrote:

Jake, as you probably already know you usually have to give the class name when attempting to get a static variable, i.e.

YourClassName::$bob;

You *can* dynamically refer to a static class variable from within an object without knowing the name of the class; this is what self is for. i.e.

class YourClassName {
  function getStatic($var) {
    return self::$var;
  }
}

Hi Jason,

Thanks for your response. :)

That doesnt seem to be an answer at all applicable to my question tho...

Ofcourse i realise you need to give the class name when attempting to get a static variable...
heh... im sure it would be interesting referencing a class without its name :)


Yours Sincerely
Jake Press

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to