scope resolution operator doesn't give compile time error in php
<p>i created a small PDO class and spent hours in debugging it and could not find a small typo which was causing every thing to fail. To demonstrate below is the buggy code. </p>

<pre><code>    class MyPDO  extends PDO
{
    private static $instance = null;
    function  __construct(){
        try{
        parent::__construct("mysql:host=localhost;port=3306;dbname=blog", "root", "");
        parent::setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
        }catch(PDOException $e){
            echo 'Exception in constructor'.print_r($e-&gt;trace(),true);
        }

    }

   static public function getDB(){
        if(self::$instance == null){
            self:$instance = new MyPDO();
        }
        return self::$instance;
    }

    function selectAll($sql){
            $stmt = self::$instance-&gt;prepare($sql);
            $stmt-&gt;execute(array(":cat_id"=&gt;1));
            return $stmt-&gt;fetchAll(PDO::FETCH_ASSOC);
    }

}
</code></pre>

<p>What i want to confirm that if any one has already seen it or is it a bug or it could be used for some thing else i have no knowledge of. </p>

<p>There is a problem with the following line i wrote. </p>

<blockquote>
  <p>self:$instance = new MyPDO();</p>
</blockquote>

<p>it should be the scope resolution operator with double colon i.e. </p>

<blockquote>
  <p>self::$instance = new MyPDO();</p>
</blockquote>

<p>To my surprise no warning or error is generated with a single colon .. If any one knows about this please share. </p>
