php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74144 Unexpected output of getAttribute
Submitted: 2017-02-22 00:57 UTC Modified: 2017-02-22 07:13 UTC
From: wriver4 at gmail dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: Irrelevant OS: irrevelent
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wriver4 at gmail dot com
New email:
PHP Version: OS:

 

 [2017-02-22 00:57 UTC] wriver4 at gmail dot com
Description:
------------
So this was an accident in typing that produced an informative but unexpected result.

Test script:
---------------
    $db = new PDO("mysql:host=localhost;dbname=classicmodels;port=3306;charset=utf8",$user, $password);
    $db->setAttribute(PDO::ATTR_PERSISTENT, TRUE);
    $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, TRUE);
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
    $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE);
    $db->setAttribute(PDO :: ATTR_CASE, PDO :: CASE_NATURAL);
}

echo $db->getAttribute(PDO::PARAM_BOOL).'<br>';

Actual result:
--------------
mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-22 07:13 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2017-02-22 07:13 UTC] requinix@php.net
PARAM_BOOL and ATTR_CLIENT_VERSION both have a value of 5.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Mar 24 17:01:29 2025 UTC