cvs: php-src /tests/classes array_access_012.phpt

From: Date: Tue, 21 Jun 2005 06:59:59 +0000
Subject: cvs: php-src /tests/classes array_access_012.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-32442@lists.php.net to get a copy of this message
helly Tue Jun 21 02:59:59 2005 EDT Added files: /php-src/tests/classes array_access_012.phpt Log: - Add new test http://cvs.php.net/co.php/php-src/tests/classes/array_access_012.phpt?r=1.1&p=1 Index: php-src/tests/classes/array_access_012.phpt +++ php-src/tests/classes/array_access_012.phpt --TEST-- ZE2 ArrayAccess cannot assign by reference --FILE-- <?php class ArrayAccessImpl implements ArrayAccess { private $data = array(); public function offsetUnset($index) {} public function offsetSet($index, $value) { $this->data[$index] = $value; } public function offsetGet($index) { return $this->data[$index]; } public function offsetExists($index) { return isset($this->data[$index]); } } $data = new ArrayAccessImpl(); $test = 'some data'; $data['element'] = NULL; // prevent notice $data['element'] = &$test; ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %sarray_access_012.php on line %d

« previous php.cvs (#32442) next »