收录日期:2019/10/18 22:09:58 时间:2012-11-20 22:17:24 标签:php,class,static,reference,this

I know it wouldn't be exactly equivalent to $this, but is there a way to reference a static class from within itself without using the name of the class itself? ( like super but for itself ) This is just a way to avoid having to refactor all the class references if the class is renamed.

Example:

class foo {
    function bar() {
        static_this::method();
        // instead of:
        foo::method();
    }
 }
self::method();