2009-03-26 12:53:39 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #47769 (Strange extends PDO)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
class test extends PDO
|
|
|
|
{
|
|
|
|
protected function isProtected() {
|
|
|
|
echo "this is a protected method.\n";
|
|
|
|
}
|
|
|
|
private function isPrivate() {
|
|
|
|
echo "this is a private method.\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
public function quote($str, $paramtype = NULL) {
|
|
|
|
$this->isProtected();
|
|
|
|
$this->isPrivate();
|
|
|
|
print $str ."\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-03-26 13:55:06 +00:00
|
|
|
$test = new test('sqlite::memory:');
|
2009-03-26 12:53:39 +00:00
|
|
|
$test->quote('foo');
|
|
|
|
$test->isProtected();
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
this is a protected method.
|
|
|
|
this is a private method.
|
|
|
|
foo
|
|
|
|
|
|
|
|
Fatal error: Call to protected method test::isProtected() from context '' in %s on line %d
|