xref: /PHP-5.4/ext/pdo/tests/bug47769.phpt (revision 1c9e7849)
1--TEST--
2Bug #47769 (Strange extends PDO)
3--SKIPIF--
4<?php
5if (!extension_loaded("pdo_sqlite"))
6	die("skip: PDO_SQLite not available");
7?>
8--FILE--
9<?php
10
11class test extends PDO
12{
13	protected function isProtected() {
14		echo "this is a protected method.\n";
15	}
16	private function isPrivate() {
17		echo "this is a private method.\n";
18	}
19
20    public function quote($str, $paramtype = NULL) {
21    	$this->isProtected();
22    	$this->isPrivate();
23    	print $str ."\n";
24	}
25}
26
27$test = new test('sqlite::memory:');
28$test->quote('foo');
29$test->isProtected();
30
31?>
32--EXPECTF--
33this is a protected method.
34this is a private method.
35foo
36
37Fatal error: Call to protected method test::isProtected() from context '' in %s on line %d
38