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/tests/classes/ |
| files >> /var/www/html/sub/images/sym/root/php-7.1.11/tests/classes/array_access_006.phpt |
--TEST--
ZE2 ArrayAccess and ASSIGN_OP operators (+=)
--FILE--
<?php
class OverloadedArray implements ArrayAccess {
public $realArray;
function __construct() {
$this->realArray = array(1,2,3);
}
function offsetExists($index) {
return array_key_exists($this->realArray, $index);
}
function offsetGet($index) {
return $this->realArray[$index];
}
function offsetSet($index, $value) {
$this->realArray[$index] = $value;
}
function offsetUnset($index) {
unset($this->realArray[$index]);
}
}
$a = new OverloadedArray;
$a[1] += 10;
var_dump($a[1]);
echo "---Done---\n";
?>
--EXPECT--
int(12)
---Done---
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`