<?php
class ArrayExtended implements ArrayAccess{
protected $ary = array();
public function __construct(array $a = null) {
if($a) $this->ary = $a;
}
public function offsetExists($off){}
public function offsetGet($off){}
public function offsetSet($off,$val){}
public function offsetUnset($off){}
}
$o = new ArrayExtended(['a','b']);
print_r($o);
Deprecated: Return type of ArrayExtended::offsetExists($off) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/0AoKW on line 10
Deprecated: Return type of ArrayExtended::offsetGet($off) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/0AoKW on line 11
Deprecated: Return type of ArrayExtended::offsetSet($off, $val) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/0AoKW on line 12
Deprecated: Return type of ArrayExtended::offsetUnset($off) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/0AoKW on line 13
ArrayExtended Object
(
[ary:protected] => Array
(
[0] => a
[1] => b
)
)