|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-06-23 14:45 UTC] Wes dot example at example dot org
[2020-06-24 07:03 UTC] millet dot gael at gmail dot com
[2020-06-24 07:55 UTC] cmb@php.net
[2020-06-24 08:08 UTC] nikic@php.net
[2020-07-13 09:12 UTC] nikic@php.net
-Status: Open
+Status: Wont fix
[2020-07-13 09:12 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 09:00:01 2025 UTC |
Description: ------------ Breaking change on SplStack iterator. If we pop from the stack, the stack become invalid for the last iteration. This code was working with php 7.2.x, but is broken with 7.3.x and 7.4.x Can be fixed by adding "$stack->rewind();" after "$stack->next();" Test script: --------------- <?php $stack = new \SplStack(); $stack->push(1); $stack->push(2); $stack->rewind(); while ($stack->valid()) { $value = $stack->pop(); var_dump($value); $stack->next(); } Expected result: ---------------- int(2) int(1) Actual result: -------------- int(2)