php-src/Zend/tests/objects_032.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

39 lines
513 B
PHP

--TEST--
Covariant return-by-ref constraints
--FILE--
<?php
class A implements ArrayAccess {
public $foo = array();
public function &offsetGet($n) {
return $this->foo[$n];
}
public function offsetSet($n, $v) {
}
public function offsetUnset($n) {
}
public function offsetExists($n) {
}
}
$a = new A;
$a['foo']['bar'] = 2;
var_dump($a);
?>
--EXPECT--
object(A)#1 (1) {
["foo"]=>
array(1) {
["foo"]=>
array(1) {
["bar"]=>
int(2)
}
}
}