#47769 [Opn->Asn]: Strange extends PDO

From: Date: Thu, 26 Mar 2009 11:59:25 +0000
Subject: #47769 [Opn->Asn]: Strange extends PDO
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135151@lists.php.net to get a copy of this message
 ID:               47769
 Updated by:       felipe@php.net
 Reported By:      admin at d9tx dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: xp sp3
 PHP Version:      5.3.0RC1
-Assigned To:      
+Assigned To:      felipe


Previous Comments:
------------------------------------------------------------------------

[2009-03-25 06:43:50] 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



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47769&edit=1



Thread (3 messages)

« previous php.bugs (#135151) next »