В чем дело?
Текст для примера:
Свернутый текст
<?php
header('Cache-Control: no-cache, must-revalidate');
header('"Expires: Mon, 26 Jul 1997 05:00:00 GMT');
error_reporting(-1);
namespace Languages;
class Danish
{
var $languagename;
public function __construct($language = 'Danish')
{
self::setLanguage($language);
}
public function setLanguage($language = 'Danish')
{
$this->languagename = $language;
return true;
}
}
class Greenlandic extends Danish
{
var $languagename;
public function Greenlandic()
{
parent::__construct();
}
public function getLanguage()
{
return isset($this->languagename) ? $this->languagename : 0;
}
}
ob_start();
$Greenlandic = new Greenlandic();
echo $Greenlandic->getLanguage()."\n";
$Greenlandic->setLanguage('English');
echo $Greenlandic->getLanguage()."\n";
ob_end_flush();
?>