Php – How to see in Netbeans, which methods an object knows

netbeansPHP

I'm using NetBeans and PHP. For example, I insert this code:

<?php
try {
    $dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
    foreach($dbh->query('SELECT * from FOO') as $row) {
        print_r($row);
    }
    $dbh = null;
} catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "<br/>";
    die();
}
?>

Now, when I hover my mouse over the $dbh symbol, I get no information about it. Other IDEs tell me which methods an object understands. I'm sure NetBeans can do the same. How?

Best Answer

Write $dbh-> and a list of functions should come up automatically. If not, press ctrl+space

Also, see this about helping netbeans with function return types and class members.

Related Topic