cvs: ZendEngine2(PHP_5_0) /tests bug32993.phpt

From: Date: Mon, 06 Jun 2005 08:25:22 +0000
Subject: cvs: ZendEngine2(PHP_5_0) /tests bug32993.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3715@lists.php.net to get a copy of this message
dmitry Mon Jun 6 04:25:22 2005 EDT Added files: (Branch: PHP_5_0) /ZendEngine2/tests bug32993.phpt Log: Added test for bug #32993 (implemented Iterator function current() don't throw exception) http://cvs.php.net/co.php/ZendEngine2/tests/bug32993.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug32993.phpt +++ ZendEngine2/tests/bug32993.phpt --TEST-- Bug #32993 (implemented Iterator function current() don't throw exception) --FILE-- <?php class Test implements Iterator { public $arr = array(); public function rewind() { return reset($this->arr); } public function current() { throw new Exception(); } public function key() { return key($this->arr); } public function next() { return next($this->arr); } public function valid() { return (current($this->arr) !== false); } } $t = new Test(); $t->arr = array(1, 2, 3); try { foreach ($t as $v) { echo "$v\n"; } } catch (Exception $e) { ; // handle exception } echo "ok\n"; ?> --EXPECT-- ok

« previous php.zend-engine.cvs (#3715) next »