- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
- Parse error: syntax error, unexpected '=', expecting ',' or ')' in /in/vSukG on line 24
Process exited with code 255.
<?php
class ExtendedArrayAccess implements ArrayAccess {
private $data = array();
function __construct(array $array = array()) {
$this->data = $array;
}
function offsetExists($offset) {
return array_key_exists($offset, $this->data);
}
function offsetGet($offset) {
return $this->data[$offset];
}
function offsetSet($offset, $value) {
$this->data[$offset] = $value;
}
function offsetUnset($offset) {
unset($this->data[$offset]);
}
}
$array = new ExtendedArrayAccess();
$array[0] = null;
assert(isset($var = $array[0]) === false);
assert(empty($array[0]) === true);