Doc #73938 [Ver->Csd]: PHP7 foreach internal array pointer

From: Date: Wed, 31 Mar 2021 14:10:10 +0000
Subject: Doc #73938 [Ver->Csd]: PHP7 foreach internal array pointer
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18681@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73938&edit=1 ID: 73938 Updated by: git@php.net Reported by: tristanlbailey at sgsoftware dot com dot au Summary: PHP7 foreach internal array pointer -Status: Verified +Status: Closed Type: Documentation Problem Package: Arrays related PHP Version: 7.0.14 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmb69 Revision: https://github.com/php/doc-en/commit/e49940b757b35b8ef26bb64380c231eda7b49fc4 Log: Fix #73938: PHP7 foreach internal array pointer Previous Comments: ------------------------------------------------------------------------ [2017-01-15 02:20:13] tristanlbailey at sgsoftware dot com dot au Specifically, the current() function will always return int(0) when used in foreach control structures. ------------------------------------------------------------------------ [2017-01-15 02:16:55] tristanlbailey at sgsoftware dot com dot au Description: ------------ --- From manual page: http://www.php.net/function.current --- PHP 7 no longer modifies the internal array pointer in foreach control structures. This should be mentioned somewhere on this page. http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.foreach.array-pointer ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73938&edit=1

« previous php.doc.bugs (#18681) next »