note 84155 added to language.oop5.paamayim-nekudotayim
| From: | barss dot dev at gmail dot com | Date: | Tue, 01 Jul 2008 10:47:38 +0000 |
| Subject: | note 84155 added to language.oop5.paamayim-nekudotayim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-141032@lists.php.net to get a copy of this message | ||
Nice trick with scope resolution
<?php
class A
{
public function TestFunc()
{
return $this->test;
}
}
class B
{
public $test;
public function __construct()
{
$this->test = "Nice trick";
}
public function GetTest()
{
return A::TestFunc();
}
}
$b = new B;
echo $b->GetTest();
?>
will output
Nice trick
----
Server IP: 91.196.196.241
Probable Submitter: 89.162.168.62
----
Manual Page -- http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
Edit -- https://master.php.net/note/edit/84155
Del: integrated -- https://master.php.net/note/delete/84155/integrated
Del: useless -- https://master.php.net/note/delete/84155/useless
Del: bad code -- https://master.php.net/note/delete/84155/bad+code
Del: spam -- https://master.php.net/note/delete/84155/spam
Del: non-english -- https://master.php.net/note/delete/84155/non-english
Del: in docs -- https://master.php.net/note/delete/84155/in+docs
Del: other reasons-- https://master.php.net/note/delete/84155
Reject -- https://master.php.net/note/reject/84155
Search -- https://master.php.net/manage/user-notes.php