As of few minutes ago PDO extension allows constructor overloading, which is something a lot of people had asked for. This means that you can do things like this: [php] class myDB extends PDO { public function construct() { parent::construct("DSN", "login","pass"); } } [/php]

Keep in mind that if you don't call the original PDO constructor via parent::__construct() an error will be generated, so exercise caution when using this feature.

Add a comment