Snippet: PHP Calling static class methods

Given the example class foo:

class foo {
  public static function myFunc() {
    return "foo - myFunc";

The class name is known in the calling context:

  echo foo::myFunc();

The class name is stored in a php var:

  $class_name = "foo";

  /** PHP 5.2.x */
  echo call_user_func(array($class_name, "myFunc"));  

  /** PHP 5.3.x */
  echo $class_name::myFunc();

More info on call_user_func:
More info on static keyword: