<?php

require("list.php");

try {
    $pdo = new PDO("mysql:dbname=$dbname;host=$dbhost;charset=utf8", $dbuser, $dbpw);
} catch (PDOException) {
    die ($e->getMassage());
}


$myAttributes = array (
    "PDO::ATTR_CLIENT_VERSION",
    "PDO::ATTR_CONNECTION_STATUS",
    "PDO::ATTR_DRIVER_NAME",
    "PDO::ATTR_ERRMODE",
    "PDO::ATTR_SERVER_INFO",
    "PDO::ATTR_SERVER_VERSION",
);

echo "<ul>\n";
foreach($myAttributes as $attribute) {
    echo "<li>" .$attribute .": " .$pdo->getAttribute(constant($attribute)) . "</li>\n";
}
echo "</ul>\n";
?>