<?php class x { private $p = ' in X'; public function foo() { return $this->p . ' ' . static::$p; } } class y extends x { function __construct() {} public static $p = ' in Y'; } $y = new y; echo $y->foo();
You have javascript disabled. You will not be able to edit any code.