且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP构造函数和静态函数

更新时间:2022-02-10 22:37:12

我看不到有什么复制你的问题。

I see nothing that replicates your question.

查看演示: http://codepad.org/h2TMPYUV

代码:

class Foo {
    function __construct(){ 
        echo 'hi!';
    }
    static function bar(){
        return 'there';
    }
}

echo Foo::bar(); //output: "there"