note 118578 added to language.oop5.overloading
| From: | qi at weiyu dot me | Date: | Thu, 31 Dec 2015 05:59:21 +0000 |
| Subject: | note 118578 added to language.oop5.overloading | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204579@lists.php.net to get a copy of this message | ||
I test those code:
<?php
class A {
public function test () {
static::who();
A::who();
self::who();
$this->who();
}
public static function __callStatic($a, $b) {
var_dump('A static');
}
public function __call($a, $b) {
var_dump('A call');
}
}
$a = new A;
$a->test();
?>
And the answer is
string(6) "A call"
string(6) "A call"
string(6) "A call"
string(6) "A call"
I think it means that __call will be called before __callStatic in an instance.
----
Server IP: 72.52.91.14
Probable Submitter: 114.111.167.226
----
Manual Page -- http://php.net/manual/en/language.oop5.overloading.php
Edit -- https://master.php.net/note/edit/118578
Del: integrated -- https://master.php.net/note/delete/118578/integrated
Del: useless -- https://master.php.net/note/delete/118578/useless
Del: bad code -- https://master.php.net/note/delete/118578/bad+code
Del: spam -- https://master.php.net/note/delete/118578/spam
Del: non-english -- https://master.php.net/note/delete/118578/non-english
Del: in docs -- https://master.php.net/note/delete/118578/in+docs
Del: other reasons-- https://master.php.net/note/delete/118578
Reject -- https://master.php.net/note/reject/118578
Search -- https://master.php.net/manage/user-notes.php