diff options
author | Marcus Boerger <helly@php.net> | 2005-06-19 20:49:17 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2005-06-19 20:49:17 +0000 |
commit | f01c842ef660b793258926296de93694eaa4444f (patch) | |
tree | 19ef2c981bfb496cb13561936aa8d75d90958a92 /tests/classes/array_access_008.phpt | |
parent | 21ce9394a7239de36cc89e774848e81fd2a24509 (diff) | |
download | php-git-f01c842ef660b793258926296de93694eaa4444f.tar.gz |
- Update tests to reflect current situation
# I don't feel like discussing this issue anymore - maybe we need to find
# a way of returning proxies to get the requested behavior back - i'll give
# it a try for PHP 5.2. So long we'll have to stay with the original
# decision that we don't support references at all with ArrayAccess.
Diffstat (limited to 'tests/classes/array_access_008.phpt')
-rwxr-xr-x | tests/classes/array_access_008.phpt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/classes/array_access_008.phpt b/tests/classes/array_access_008.phpt index 84ecf08ba8..0130388245 100755 --- a/tests/classes/array_access_008.phpt +++ b/tests/classes/array_access_008.phpt @@ -14,7 +14,7 @@ class Peoples implements ArrayAccess { return array_key_exists($this->person, $index); } - function & offsetGet($index) { + function offsetGet($index) { return $this->person[$index]; } @@ -40,6 +40,8 @@ echo "===ArrayOverloading===\n"; $people = new Peoples; var_dump($people[0]['name']); +$people[0]['name'] = 'FooBar'; +var_dump($people[0]['name']); $people[0]['name'] = $people->person[0]['name'] . 'Bar'; var_dump($people[0]['name']); $people[0]['name'] .= 'Baz'; @@ -47,12 +49,11 @@ var_dump($people[0]['name']); ?> ===DONE=== ---EXPECT-- +--EXPECTF-- string(3) "Foo" string(6) "FooBar" string(9) "FooBarBaz" ===ArrayOverloading=== string(3) "Foo" -string(6) "FooBar" -string(9) "FooBarBaz" -===DONE=== + +Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_008.php on line %d |