<?php
class Base { protected $foo = 'Base'; }
class Other extends Base { public function __construct() { $this->foo = 'Other'; } }
class Child extends Base { public function bar() { $otherBase = new Other(); echo $otherBase->foo; } }
$child = new Child();
$child->bar();