You are not using defined()
properly, is my guess. You need to provide it a string.
if( defined( 'PDO::MYSQL_ATTR_MAX_BUFFER_SIZE' ) ) // note the quotes
{
// do something useful with PDO::MYSQL_ATTR_MAX_BUFFER_SIZE
}
The above example doesn't issue any notice/warning/error in my setup (PHP 5.3.20, in which PDO::MYSQL_ATTR_MAX_BUFFER_SIZE
is not defined), using error_reporting( E_ALL | E_STRICT )
.