<?php class A { private $b = 1; private function foo() {} } class B extends A { public function getB() { $this->foo(); return $this->b; } } $b = new B; var_dump($b->getB());
You have javascript disabled. You will not be able to edit any code.