Date: 12/21/00
- Next message: john <email protected>: "[PHP-DEV] PHP 4.0 Bug #8354: session_unset() causes a segfault"
- Previous message: hholzgra <email protected>: "[PHP-DEV] PHP 4.0 Bug #8329 Updated: fatal fault : call to unsupported or undefind function: mysql_connect()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: lunepi <email protected>
Operating system:
PHP version: 4.0.4
PHP Bug Type: Arrays related
Bug description: foreach modify array pointer
try 1.:
$var[] = "1";
$var[] = "2";
foreach($var as $test)
{
echo $test;
}
reset($var);
echo current($var);
output -> 12
then try:
$var[] = "1";
$var[] = "2";
//reset($var);
foreach($var as $test)
{
echo $test;
current($var);
}
echo current($var);
output -> 121
this should be the output of the first script too?
Greetings lunepi
-- Edit Bug report at: http://bugs.php.net/?id=8353&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: john <email protected>: "[PHP-DEV] PHP 4.0 Bug #8354: session_unset() causes a segfault"
- Previous message: hholzgra <email protected>: "[PHP-DEV] PHP 4.0 Bug #8329 Updated: fatal fault : call to unsupported or undefind function: mysql_connect()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

