|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67307 Test ext/pdo_sqlite/tests/bug43831.phpt provides invalid expectation
Submitted: 2014-05-20 09:45 UTC Modified: 2014-05-20 09:54 UTC
From: Assigned:
Status: Not a bug Package: PDO SQLite
PHP Version: master-Git-2014-05-20 (Git) OS: *
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2014-05-20 09:45 UTC]
The test provides invalid expectation and hides the real problem.
for some reason the second assignment statement changes the value of $bar.
It's done not on purpose.

$bar = new PDO("sqlite::memory:", null, null, array(PDO::ATTR_PERSISTENT => true));
$baz = new MyPDO("sqlite::memory:", null, null, array(PDO::ATTR_PERSISTENT => true));

var_dump($bar); // Prints object(MyPDO) instead of object(PDO)

the bug and test are fixed in phpng.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-20 09:54 UTC]
-Status: Open +Status: Not a bug
 [2014-05-20 09:54 UTC]
it's probably my mistake, however PDO behaviour is really wired
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Nov 28 20:05:53 2022 UTC