Código PHP:
Ver originalclass Database extends PDO {
function __construct
($driver, $host, $name, $user, $pass = null, array $opt = []) { parent::__construct("$driver:host=$host;dbname=$name;", $user, $pass, $opt);
}
}
$link = new Database('mysql', 'localhost', 'base_de_datos', 'root');