[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] [doc-en] master: Update goto.xml
From:       Mikhail Alferov via Gina Peter Banyard <noreply () php ! net>
Date:       2024-03-11 16:47:27
Message-ID: yYUEEXngz1l2kXLf1v96lTXiFwDzkZOYbn6FbDWAnE () main ! php ! net
[Download RAW message or body]

Author: Mikhail Alferov (mmalferov)
Committer: Gina Peter Banyard (Girgias)
Date: 2024-03-11T16:33:36Z

Commit: https://github.com/php/doc-en/commit/890a03076b2708f65ff15fec9968ad6580131b36
Raw diff: https://github.com/php/doc-en/commit/890a03076b2708f65ff15fec9968ad6580131b36.diff

Update goto.xml

combed examples

Changed paths:
  M  language/control-structures/goto.xml


Diff:

diff --git a/language/control-structures/goto.xml b/language/control-structures/goto.xml
index d0da3226f4c..afe2c935539 100644
--- a/language/control-structures/goto.xml
+++ b/language/control-structures/goto.xml
@@ -35,11 +35,13 @@
    <programlisting role="php">
 <![CDATA[
 <?php
+
 goto a;
 echo 'Foo';
- 
+
 a:
 echo 'Bar';
+
 ?>
 ]]>
    </programlisting>
@@ -57,14 +59,18 @@ Bar
    <programlisting role="php">
 <![CDATA[
 <?php
-for($i=0,$j=50; $i<100; $i++) {
-  while($j--) {
-    if($j==17) goto end; 
-  }  
+
+for ($i = 0, $j = 50; $i < 100; $i++) {
+    while ($j--) {
+        if ($j == 17) {
+            goto end;
+        }
+    }
 }
 echo "i = $i";
 end:
 echo 'j hit 17';
+
 ?>
 ]]>
    </programlisting>
@@ -82,13 +88,15 @@ j hit 17
    <programlisting role="php">
 <![CDATA[
 <?php
+
 goto loop;
-for($i=0,$j=50; $i<100; $i++) {
-  while($j--) {
-    loop:
-  }
+for ($i = 0, $j = 50; $i < 100; $i++) {
+    while ($j--) {
+        loop:
+    }
 }
 echo "$i = $i";
+
 ?>
 ]]>
    </programlisting>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic