Standard errorInfo() returns only a code and message. PDO v2.0 adds getExtendedInfo() :
This closes a major gap between database string constraints and domain types. pdo v2.0 extended features
Benchmark results simulated on PHP 8.3 + MySQL 8.0. Standard errorInfo() returns only a code and message
Summary