Estas constantes están definidas por esta extensión y estarán disponibles sólo cuando la extensión haya sido compilada con PHP, o bien sea cargada dinámicamente en ejecución.
PDO uses class constants since PHP 5.1. Prior releases use global constants in the form PDO_PARAM_BOOL.
Note: The magic __set() method is called if the property doesn't exist in the requested class
Example #1 using PDO::ATTR_DRIVER_NAME
<?php
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
echo "Running on mysql; doing something mysql specific here\n";
}
?>