title: interface reference to its implemented object in php
body: <p>I'm trying to point a interface reference to its implemented object in PHP.
  Here's my try</p>
  
  <p>Here's the class:</p>
  
  <pre><code>class Account implements FDInterface
  {
      public $bal;
      public function Account() 
      {
          $bal = 0;
          echo 'Account created with balance '.$bal;
      }
  
      public function getFDInterest()
      {
          echo '&lt;/br&gt; Interest Rate is 9.85';
      }
  }
  </code></pre>
  
  <p>The interface:</p>
  
  <pre><code>interface FDInterface 
  {
      public function getFDInterest();
  }
  </code></pre>
  
  <p>And the real problem here in <code>Index.php</code></p>
  
  <pre><code>FDInterface fdAcc = new Account();   // this is line 1
  $fdAcc-&gt;getFDInterest();
  </code></pre>
  
  <p>Output I get is</p>
  
  <blockquote>
    <p>syntax error, unexpected T_STRING Index.php on line 1</p>
  </blockquote>