|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-03-03 07:56 UTC] cweiske@php.net
[2015-03-03 09:02 UTC] reeze@php.net
[2015-03-03 10:18 UTC] laruence@php.net
[2015-03-03 10:18 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2016-07-20 11:39 UTC] davey@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 21 23:00:01 2025 UTC |
Description: ------------ When assigning the result of array_values() to an array variable, its internal key counter does not get reset anymore as it did on PHP 4 and PHP 5. Test script: --------------- <?php $ar = array('foo'); unset($ar[0]); $ar = array_values($ar); $ar[] = 'bar'; var_dump($ar); ?> Expected result: ---------------- array(1) { [0] => string(3) "bar" } Actual result: -------------- array(1) { [1]=> string(3) "bar" }