php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73938 PHP7 foreach internal array pointer
Submitted: 2017-01-15 02:16 UTC Modified: 2021-03-31 14:09 UTC
From: tristanlbailey at sgsoftware dot com dot au Assigned: cmb (profile)
Status: Closed Package: Arrays related
PHP Version: 7.0.14 OS:
Private report: No CVE-ID: None
 [2017-01-15 02:16 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-15 02:20 UTC] 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 19:03 UTC] cmb@php.net
-Status: Open +Status: Verified -Type: Feature/Change Request +Type: Documentation Problem -Package: Documentation problem +Package: Arrays related
 [2021-03-31 14:09 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2021-03-31 14:10 UTC] git@php.net
Automatic comment on behalf of cmb69
Revision: https://github.com/php/doc-en/commit/e49940b757b35b8ef26bb64380c231eda7b49fc4
Log: Fix #73938: PHP7 foreach internal array pointer
 [2021-03-31 14:10 UTC] git@php.net
-Status: Verified +Status: Closed
 [2021-04-01 01:31 UTC] git@php.net
Automatic comment on behalf of mumumu
Revision: https://github.com/php/doc-ja/commit/35f911858fc2714cd3faf424157bd50f8651edd8
Log: Fix #73938: PHP7 foreach internal array pointer
 [2021-04-15 21:36 UTC] git@php.net
Automatic comment on behalf of Girgias
Revision: https://github.com/php/doc-fr/commit/10d0ccd67f3315d5519c03476f1c92c9073b9f96
Log: Fix #73938: PHP7 foreach internal array pointer
 [2021-05-04 13:12 UTC] git@php.net
Automatic comment on behalf of shiny
Revision: https://github.com/php/doc-zh/commit/cb44b849aded1fcbf63f471bf2e7a5a536e49ec9
Log: Fix #73938: PHP7 foreach internal array pointer(php/doc-en@e49940b757b35b8ef26bb64380c231eda7b49fc4)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 09:01:30 2024 UTC