Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tag: php-5.1.2RC1
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (30 sloc) 659 Bytes
ZE2 A private method cannot be called in a derived class
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
class pass {
private function show() {
echo "Call show()\n";
protected function good() {
class fail extends pass {
public function ok() {
public function not_ok() {
$t = new fail();
$t->not_ok(); // calling a private function
echo "Done\n"; // shouldn't be displayed
Call show()
Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d
Jump to Line
Something went wrong with that request. Please try again.