#37598 [Opn]: prev() fonction crash the array pointer
| From: | jerebenz at gmail dot com | Date: | Fri, 26 May 2006 02:08:34 +0000 |
| Subject: | #37598 [Opn]: prev() fonction crash the array pointer | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97621@lists.php.net to get a copy of this message | ||
ID: 37598
User updated by: jerebenz at gmail dot com
Reported By: jerebenz at gmail dot com
Status: Open
Bug Type: Scripting Engine problem
Operating System: Unix
PHP Version: 4.4.2
New Comment:
Hi,
The problem occur when the pointer of an array is at the start and I do
a
prev().
If I try to do current() after that, I see nothing, and if I try
next()
and current() again, still nothing.
Bye
Previous Comments:
------------------------------------------------------------------------
[2006-05-26 01:58:40] jerebenz at gmail dot com
Description:
------------
Hi,
The problem occur the pointer of an array is at the start and I do a
prev().
If I try to do current() after that, I see nothing, and if I try next()
and current() again, still nothing.
Bye
Reproduce code:
---------------
<?php
$tab = array('4', '6');
echo current($tab);
prev($tab);
echo current($tab);
next($tab);
echo current($tab);
?>
Expected result:
----------------
446
Actual result:
--------------
4
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37598&edit=1