php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /var/www/html/sub/images/sym/root/php-7.1.11/Zend/tests/ |
| files >> //var/www/html/sub/images/sym/root/php-7.1.11/Zend/tests/indirect_call_array_003.phpt |
--TEST--
Indirect method call by array - Calling __call() and __callStatic()
--FILE--
<?php
class foo {
public function __call($a, $b) {
printf("From %s:\n", __METHOD__);
var_dump($a);
var_dump($this);
}
static public function __callStatic($a, $b) {
printf("From %s:\n", __METHOD__);
var_dump($a);
var_dump($this);
}
}
$arr = array('foo', 'abc');
try {
$arr();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
$foo = new foo;
$arr = array($foo, 'abc');
$arr();
?>
--EXPECTF--
From foo::__callStatic:
string(3) "abc"
Exception: Using $this when not in object context
From foo::__call:
string(3) "abc"
object(foo)#%d (0) {
}
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`