There are two classes:
class Db {
    public static function getConnection () {
        /*Initialize parameters*/
        $db = new PDO (...);
        return $db;
    }
}
Class Db initializes and returns a PDO object.
Then I want to do following in another class:
class User {
    private $db = Db::getConnection();
    ....
}
Why am I getting an error here:
private $db = Db::getConnection();
 
    