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_003.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_003.phpt')
-rw-r--r-- | tests/classes/array_access_003.phpt | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/classes/array_access_003.phpt b/tests/classes/array_access_003.phpt index bed09b89e5..2d42665fc6 100644 --- a/tests/classes/array_access_003.phpt +++ b/tests/classes/array_access_003.phpt @@ -12,7 +12,7 @@ class object implements ArrayAccess { echo __METHOD__ . "($index)\n"; return array_key_exists($index, $this->a); } - function &offsetGet($index) { + function offsetGet($index) { echo __METHOD__ . "($index)\n"; switch($index) { case 1: @@ -48,12 +48,9 @@ var_dump($obj[2]); ===DONE=== --EXPECTF-- object::offsetGet(1) - -Strict Standards: Only variable references should be returned by reference in %sarray_access_003.php on line %d string(6) "fooBar" object::offsetGet(2) int(1) object::offsetGet(2) -object::offsetGet(2) -int(2) -===DONE=== + +Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_003.php on line %d |