|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-02 00:51 UTC] colder@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 08:00:02 2025 UTC |
Description: ------------ When requesting the 'current' pointer in an array it always returns the 'first' item. Reproduce code: --------------- $search_array = array('first' => 1, 'second' => 4,'third' => 51, 'fourth' => 54,'fifth' => 15); if (array_key_exists('fourth', $search_array)) { echo current($search_array); } Expected result: ---------------- Expecting the 'fourth' item. Actual result: -------------- Always returns the 'first' item.