MySQL database connection in the constructor
A better practice is passing a created DB instance to the Users class. Imagine that you have a Products class, an Orders class etc. Will all of their constructors create a separate MySQL connection? It doesn't look a good idea since all of them could use the same database connection. 

class Users {
    private $db;

    public function __construct($db) {
        $this-&gt;db = $db;
    }

    ....
}

class Products {
    private $db;

    public function __construct($db) {
        $this-&gt;db = $db;
    }

    ....
}

$db = new DB();
$users = new Users($db);
$products = new Products($db);