首頁 > 連結分享 > [Web] 連結分享

[Web] 連結分享

2007年9月10日 jaceju


PHP

  • Late Static Bindings Explained

    這個功能會出現在 PHP6 上,不過也可能會在 PHP5 的新版本實作出來。簡單說明一下:

    以往我們在繼承 Class 後,是不可能覆寫 (override) static method 的,例如:

    <?php
    class A
    {
        public static function who()
        {
            echo __CLASS__;
        }
     
        public static function test()
        {
            self::who();
        }
    }
     
    class B extends A
    {
        public static function who()
        {
            echo __CLASS__;
        }
    }
     
    B::test(); // A

    在 PHP6 裡提供了一個 static 關鍵字,用來表示繼承後的類別 (self 保留給目前的類別使用) :

    <?php
    class A
    {
        public static function who()
        {
            echo __CLASS__;
        }
     
        public static function test()
        {
            static::who();
        }
    }
     
    class B extends A
    {
        public static function who()
        {
            echo __CLASS__;
        }
    }
     
    B::test(); // B

    看起來相當方便,就是不知道實際用起來如何了。

  • Perverting windows with PHP

    介紹一些 PHP 在 Windows 上的 Solution ,也包含 Winbinder

JavaScript

SQL

Other

  • 20 (Alternate) Ways to Focus on Users

    我覺得這篇文章是「如何設計好網站」的進階濃縮版本。然後我的感想 (也可以說是經驗) 是:如果這個網站連你自己都不想用,那就別指望客戶會掏錢給你。

    註:不過世事無絕對,就是有那種天兵客戶願意花錢叫你做一些你想砸電腦的功能。

Categories: 連結分享 Tags:
目前尚未開放評論的功能。