diff --git a/language/control-structures/alternative-syntax.xml b/language/control-structures/alternative-syntax.xml index eb85f3f58e..b8786084e7 100644 --- a/language/control-structures/alternative-syntax.xml +++ b/language/control-structures/alternative-syntax.xml @@ -3,6 +3,7 @@ Alternative syntax for control structures + PHP offers an alternative syntax for some of its control structures; namely, if, diff --git a/language/control-structures/break.xml b/language/control-structures/break.xml index d454708dba..e63f45c684 100644 --- a/language/control-structures/break.xml +++ b/language/control-structures/break.xml @@ -3,6 +3,7 @@ <literal>break</literal> + break ends execution of the current for, foreach, diff --git a/language/control-structures/continue.xml b/language/control-structures/continue.xml index ae1e24b0a0..10a76af8e7 100644 --- a/language/control-structures/continue.xml +++ b/language/control-structures/continue.xml @@ -3,6 +3,7 @@ <literal>continue</literal> + continue is used within looping structures to skip the rest of the current loop iteration and continue execution diff --git a/language/control-structures/declare.xml b/language/control-structures/declare.xml index f55b2c4595..77672b8835 100644 --- a/language/control-structures/declare.xml +++ b/language/control-structures/declare.xml @@ -3,6 +3,7 @@ <literal>declare</literal> + The declare construct is used to set execution directives for a block of code. diff --git a/language/control-structures/do-while.xml b/language/control-structures/do-while.xml index 5807467ab0..ba6bd18c7a 100644 --- a/language/control-structures/do-while.xml +++ b/language/control-structures/do-while.xml @@ -3,6 +3,7 @@ <literal>do-while</literal> + do-while loops are very similar to while loops, except the truth expression is diff --git a/language/control-structures/else.xml b/language/control-structures/else.xml index 28ad78e097..0f0699e591 100644 --- a/language/control-structures/else.xml +++ b/language/control-structures/else.xml @@ -3,6 +3,7 @@ <literal>else</literal> + Often you'd want to execute a statement if a certain condition is met, and a different statement if the condition is not met. This @@ -57,4 +58,4 @@ End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> \ No newline at end of file +--> diff --git a/language/control-structures/elseif.xml b/language/control-structures/elseif.xml index 94b56bc79f..591df0f795 100644 --- a/language/control-structures/elseif.xml +++ b/language/control-structures/elseif.xml @@ -3,6 +3,7 @@ <literal>elseif</literal>/<literal>else if</literal> + elseif, as its name suggests, is a combination of if and else. Like diff --git a/language/control-structures/for.xml b/language/control-structures/for.xml index 56bae48a8d..4eea2ba400 100644 --- a/language/control-structures/for.xml +++ b/language/control-structures/for.xml @@ -3,6 +3,7 @@ <literal>for</literal> + for loops are the most complex loops in PHP. They behave like their C counterparts. The syntax of a diff --git a/language/control-structures/foreach.xml b/language/control-structures/foreach.xml index bf0936e9bc..71c029f260 100644 --- a/language/control-structures/foreach.xml +++ b/language/control-structures/foreach.xml @@ -3,6 +3,7 @@ <literal>foreach</literal> + PHP 4 introduced a foreach construct, much like Perl and some other languages. This simply gives an easy way to diff --git a/language/control-structures/goto.xml b/language/control-structures/goto.xml index df719be1f3..0e977b314a 100644 --- a/language/control-structures/goto.xml +++ b/language/control-structures/goto.xml @@ -3,6 +3,7 @@ <literal>goto</literal> + The goto operator can be used to jump to another section in the program. The target point is specified by a label diff --git a/language/control-structures/if.xml b/language/control-structures/if.xml index 6e039d00bb..0e04eebc86 100644 --- a/language/control-structures/if.xml +++ b/language/control-structures/if.xml @@ -3,6 +3,7 @@ <literal>if</literal> + The if construct is one of the most important features of many languages, PHP included. It allows for diff --git a/language/control-structures/include-once.xml b/language/control-structures/include-once.xml index 8f945acceb..5da3a46a13 100644 --- a/language/control-structures/include-once.xml +++ b/language/control-structures/include-once.xml @@ -3,6 +3,7 @@ <function>include_once</function> + The include_once statement includes and evaluates the specified file during the execution of the script. diff --git a/language/control-structures/include.xml b/language/control-structures/include.xml index 7080fa8a03..0ed82a36a4 100644 --- a/language/control-structures/include.xml +++ b/language/control-structures/include.xml @@ -3,6 +3,7 @@ <function>include</function> + The include statement includes and evaluates the specified file. diff --git a/language/control-structures/require-once.xml b/language/control-structures/require-once.xml index 7a1567ffe4..74f17e2f12 100644 --- a/language/control-structures/require-once.xml +++ b/language/control-structures/require-once.xml @@ -3,6 +3,7 @@ <function>require_once</function> + The require_once statement is identical to require except PHP will check if the file has diff --git a/language/control-structures/require.xml b/language/control-structures/require.xml index 13012bdf02..1af79ad87e 100644 --- a/language/control-structures/require.xml +++ b/language/control-structures/require.xml @@ -3,6 +3,7 @@ <function>require</function> + require is identical to include diff --git a/language/control-structures/return.xml b/language/control-structures/return.xml index e39db9d216..e13bf3b5af 100644 --- a/language/control-structures/return.xml +++ b/language/control-structures/return.xml @@ -3,6 +3,7 @@ return + If called from within a function, the return statement immediately ends execution of the current function, and diff --git a/language/control-structures/switch.xml b/language/control-structures/switch.xml index 6433bee198..aa1dea07e8 100644 --- a/language/control-structures/switch.xml +++ b/language/control-structures/switch.xml @@ -3,6 +3,7 @@ <literal>switch</literal> + The switch statement is similar to a series of IF statements on the same expression. In many occasions, you may diff --git a/language/control-structures/versions.xml b/language/control-structures/versions.xml new file mode 100644 index 0000000000..f44a929625 --- /dev/null +++ b/language/control-structures/versions.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/language/control-structures/while.xml b/language/control-structures/while.xml index c70df39dd8..0a5e033271 100644 --- a/language/control-structures/while.xml +++ b/language/control-structures/while.xml @@ -3,6 +3,7 @@ <literal>while</literal> + while loops are the simplest type of loop in PHP. They behave just like their C counterparts. The basic form