[php-src] Issue #9947: PDO MySQL Can set ATTR_TIMEOUT but don't able to get it

From: Date: Mon, 14 Nov 2022 10:39:30 +0000
Subject: [php-src] Issue #9947: PDO MySQL Can set ATTR_TIMEOUT but don't able to get it
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242815@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9947 Author: shyim ### Description The following code: ```php <?php $dsn = 'mysql:dbname=testdb;host=127.0.0.1'; $user = 'dbuser'; $password = 'dbpass'; $pdo = new PDO($dsn, $user, $password); $pdo->setAttribute(\PDO::ATTR_TIMEOUT, 5); var_dump($pdo->getAttribute(\PDO::ATTR_TIMEOUT)); ``` Resulted in this output: ``` Fatal error: Uncaught PDOException: SQLSTATE[IM001]: Driver does not support this function: driver does not support that attribute ``` But I expected this output instead: ``` int(5) ``` ### PHP Version PH P 8.1.12 ### Operating System macOS Ventura 13.1 Beta 2

« previous php.bugs (#242815) next »