title: PHP Specify the Return Type Hints for a Method
body: <p>What is the correct syntax for me to specify the return type hints for a method?</p>
  
  <p>For example, I have such a method:</p>
  
  <pre><code>private static function ConstructPDOObject($dbname) 
  {
        $hostname =self::HOSTNAME;
          $username = self::USERNAME;
          $password = self::PASSWORD;
          $dbh = new PDO("mysql:host=$hostname;dbname=$dbname", $username, $password);
          return $dbh;
  }
  </code></pre>
  
  <p>And I want, whenever I call the above method, the IDE will show me the methods for PDO.</p>
  
  <p>How to add the type hint?</p>