php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #30612 [de] control-structures.foreach: syntax error
Submitted: 2004-10-29 12:39 UTC Modified: 2004-10-29 16:19 UTC
From: andreas at windischer dot at Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: andreas at windischer dot at
New email:
PHP Version: OS:

 

 [2004-10-29 12:39 UTC] andreas at windischer dot at
Description:
------------
"}" after "?>"-Tag

Reproduce code:
---------------
<?php
$arr = array("eins", "zwei", "drei");
reset ($arr);
while (list(, $value) = each ($arr)) {
   echo "Wert:  $value<br />\n";
}

foreach ($arr as $value) {
   echo "Wert:  $value<br />\n";
?>
} 

Expected result:
----------------
<?php
$arr = array("eins", "zwei", "drei");
reset ($arr);
while (list(, $value) = each ($arr)) {
   echo "Wert:  $value<br />\n";
}

foreach ($arr as $value) {
   echo "Wert:  $value<br />\n";
}
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-29 12:55 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Of course this is going to give a parse error, you have broken code.
 [2004-10-29 13:04 UTC] vrana@php.net
It's wrong in German translation at http://de.php.net/manual/de/control-structures.foreach.php page. I sent it to doc-de.
 [2004-10-29 16:19 UTC] wiesemann@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 19 11:00:01 2025 UTC