php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47769 Strange extends PDO
Submitted: 2009-03-25 06:43 UTC Modified: 2009-03-26 12:54 UTC
From: admin at d9tx dot com Assigned: felipe (profile)
Status: Closed Package: PDO related
PHP Version: 5.3.0RC1 OS: xp sp3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: admin at d9tx dot com
New email:
PHP Version: OS:

 

 [2009-03-25 06:43 UTC] admin at d9tx dot com
Description:
------------
if extends pdo, then visibility keyword work failure.

Reproduce code:
---------------
class test extends PDO
{
    private function isPrivate()
    {
        echo 'this is a private method.';
    }
}

$test = new test('sqlite:./test/mydb.sq3');
$test->isPrivate();
// bad output: this is a private method.

Expected result:
----------------
class test extends PDO
{
    private function isPrivate()
    {
        echo 'this is a private method.';
    }
}

$test = new test('sqlite:./test/mydb.sq3');
$test->isPrivate();
// Expected output: Fatal error: Call to private method test::isPrivate() from


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-26 12:54 UTC] felipe@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in 5.3CVS and HEAD.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC