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

From: Date: Sun, 15 Jan 2017 19:03:17 +0000
Subject: Req->Doc #73938 [Opn->Ver]: PHP7 foreach internal array pointer
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14354@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: cmb@php.net Reported by: tristanlbailey at sgsoftware dot com dot au Summary: PHP7 foreach internal array pointer -Status: Open +Status: Verified -Type: Feature/Change Request +Type: Documentation Problem -Package: Documentation problem +Package: Arrays related PHP Version: 7.0.14 Block user comment: N Private report: N 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 (#14354) next »