note 111148 added to language.oop5.visibility
| From: | aergaerhaer at mail dot ru | Date: | Sun, 20 Jan 2013 05:26:47 +0000 |
| Subject: | note 111148 added to language.oop5.visibility | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-193276@lists.php.net to get a copy of this message | ||
class Exam1
{
private $id;
public function __construct()
{
$this->id = 5;
}
public function getObj()
{
$dd = new Exam1();
$dd->id = 54;
$mm = new Exam2();
$mm->id = 55;
return $mm;
}
public function getId()
{
return $this->id;
}
}
class Exam2 extends Exam1
{
private $id2;
}
$d = new Exam1();
echo $d->getId();
echo '<br/>';
echo $d->getObj()->getId();
----
Server IP: 69.147.83.199
Probable Submitter: 178.210.3.232
----
Manual Page -- http://php.net/manual/en/language.oop5.visibility.php
Edit -- https://master.php.net/note/edit/111148
Del: integrated -- https://master.php.net/note/delete/111148/integrated
Del: useless -- https://master.php.net/note/delete/111148/useless
Del: bad code -- https://master.php.net/note/delete/111148/bad+code
Del: spam -- https://master.php.net/note/delete/111148/spam
Del: non-english -- https://master.php.net/note/delete/111148/non-english
Del: in docs -- https://master.php.net/note/delete/111148/in+docs
Del: other reasons-- https://master.php.net/note/delete/111148
Reject -- https://master.php.net/note/reject/111148
Search -- https://master.php.net/manage/user-notes.php