php-src/Zend/tests/access_modifiers_010.phpt
2008-03-12 12:58:12 +00:00

32 lines
408 B
PHP

--TEST--
Testing visibility of methods
--FILE--
<?php
class d {
private function test2() {
print "Bar\n";
}
}
abstract class a extends d {
public function test() {
$this->test2();
}
}
abstract class b extends a {
}
class c extends b {
public function __construct() {
$this->test();
}
}
new c;
?>
--EXPECTF--
Fatal error: Call to private method d::test2() from context 'a' in %s on line %d