dallas Tue Aug 9 14:34:44 2005 EDT
Modified files: /phpdoc/en/language control-structures.xml Log: Change expr to expression
http://cvs.php.net/diff.php/phpdoc/en/language/control-structures.xml?r1=1.123&r2=1.124&ty=u Index: phpdoc/en/language/control-structures.xml diff -u phpdoc/en/language/control-structures.xml:1.123 phpdoc/en/language/control-structures.xml:1.124 --- phpdoc/en/language/control-structures.xml:1.123 Thu Jul 14 05:21:12 2005 +++ phpdoc/en/language/control-structures.xml Tue Aug 9 14:34:43 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.123 $ --> +<!-- $Revision: 1.124 $ --> <chapter id="language.control-structures"> <title>Control Structures</title> @@ -34,9 +34,9 @@ </para> <simpara> As described in <link linkend="language.expressions">the section about - expressions</link>, <replaceable>expr</replaceable> is evaluated to its - Boolean value. If <replaceable>expr</replaceable> evaluates to &true;, - PHP will execute <replaceable>statement</replaceable>, and if it evaluates + expressions</link>, <replaceable>expression</replaceable> is evaluated to its + Boolean value. If <replaceable>expression</replaceable> evaluates to &true;, + PHP will execute <replaceable>statement</replaceable>, and if it evaluates to &false; - it'll ignore it. More information about what values evaluate to &false; can be found in the <link linkend="language.types.boolean.casting">'Converting to boolean'</link> @@ -780,7 +780,7 @@ </para> <para> Omitting the semicolon after <literal>continue</literal> can lead to - confusion. Here's an example of what you shouldn't do. + confusion. Here's an example of what you shouldn't do. </para> <para> <informalexample> @@ -930,7 +930,7 @@ <simpara> Here, if <varname>$i</varname> is equal to 0, PHP would execute all of the echo statements! If <varname>$i</varname> is equal to 1, PHP would execute the last two - echo statements. You would get the expected behavior ('i equals 2' + echo statements. You would get the expected behavior ('i equals 2' would be displayed) only if <varname>$i</varname> is equal to 2. Thus, it is important not to forget <literal>break</literal> statements (even though you may want to avoid supplying them on purpose under @@ -1060,7 +1060,7 @@ <literal>directive</literal> block. </para> <para> - The <literal>declare</literal> construct can also be used in the global + The <literal>declare</literal> construct can also be used in the global scope, affecting all code following it. <informalexample> <programlisting role="php"> @@ -1093,7 +1093,7 @@ </para> <para> The event(s) that occur on each tick are specified using the - <function>register_tick_function</function>. See the example + <function>register_tick_function</function>. See the example below for more details. Note that more than one event can occur for each tick. </para> @@ -1178,7 +1178,7 @@ named by the <link linkend="ini.auto-prepend-file">auto_prepend_file</link> or <link linkend="ini.auto-append-file">auto_append_file</link> - configuration options in &php.ini;, + configuration options in &php.ini;, then that script file's execution is ended. </simpara> <simpara>For more information, see <link @@ -1217,18 +1217,18 @@ the specific file. </simpara> <simpara> - <function>require</function> includes and evaluates a specific file. - Detailed information on how this inclusion works is described in the + <function>require</function> includes and evaluates a specific file. + Detailed information on how this inclusion works is described in the documentation for <function>include</function>. </simpara> <simpara> - <function>require</function> and <function>include</function> - are identical in every way except how they handle failure. - <function>include</function> produces a - <link linkend="internal.e-warning">Warning</link> while + <function>require</function> and <function>include</function> + are identical in every way except how they handle failure. + <function>include</function> produces a + <link linkend="internal.e-warning">Warning</link> while <function>require</function> results in a <link linkend="internal.e-error"> - Fatal Error</link>. In other words, don't hesitate to use - <function>require</function> if you want a missing file to halt processing + Fatal Error</link>. In other words, don't hesitate to use + <function>require</function> if you want a missing file to halt processing of the page. <function>include</function> does not behave this way, the script will continue regardless. Be sure to have an appropriate <link linkend="ini.include-path">include_path</link> setting as well. @@ -1269,15 +1269,15 @@ </simpara> </note> </para> - + ¬e.language-construct; - + &warn.no-win32-fopen-wrapper; - + <simpara> See also <function>include</function>, <function>require_once</function>, - <function>include_once</function>, <function>eval</function>, - <function>file</function>, <function>readfile</function>, + <function>include_once</function>, <function>eval</function>, + <function>file</function>, <function>readfile</function>, <function>virtual</function> and <link linkend="ini.include-path">include_path</link>. </simpara> </sect1> @@ -1291,12 +1291,12 @@ <simpara> The documentation below also applies to <function>require</function>. The two constructs are identical in every way except how they handle - failure. <function>include</function> produces a + failure. <function>include</function> produces a <link linkend="internal.e-warning">Warning</link> while <function>require</function> results in a <link linkend="internal.e-error">Fatal Error</link>. - In other words, use <function>require</function> if you want - a missing file to halt processing of the page. <function>include</function> does - not behave this way, the script will continue regardless. Be sure to have an + In other words, use <function>require</function> if you want + a missing file to halt processing of the page. <function>include</function> does + not behave this way, the script will continue regardless. Be sure to have an appropriate <link linkend="ini.include-path">include_path</link> setting as well. Be warned that parse error in included file doesn't cause processing halting in PHP versions prior to PHP 4.3.5. Since this version, it does. @@ -1435,7 +1435,7 @@ </programlisting> </example> See also <link linkend="features.remote-files">Remote files</link>, - <function>fopen</function> and <function>file</function> for related + <function>fopen</function> and <function>file</function> for related information. </para> <para> @@ -1508,7 +1508,7 @@ <note> <simpara> In PHP 3, the return may not appear inside a block unless it's - a function block, in which case the <function>return</function> applies + a function block, in which case the <function>return</function> applies to that function and not the whole file. </simpara> </note> @@ -1551,9 +1551,9 @@ </example> </para> <simpara> - <literal>$bar</literal> is the value <literal>1</literal> because the include - was successful. Notice the difference between the above examples. The first uses - <function>return</function> within the included file while the other does not. + <literal>$bar</literal> is the value <literal>1</literal> because the include + was successful. Notice the difference between the above examples. The first uses + <function>return</function> within the included file while the other does not. If the file can't be included, &false; is returned and <literal>E_WARNING</literal> is issued. </simpara> @@ -1568,8 +1568,8 @@ the included file. </para> <simpara> - Another way to "include" a PHP file into a variable is to capture the - output by using the <link linkend="ref.outcontrol">Output Control + Another way to "include" a PHP file into a variable is to capture the + output by using the <link linkend="ref.outcontrol">Output Control Functions</link> with <function>include</function>. For example: </simpara> <para> @@ -1598,11 +1598,11 @@ </para> <para> In order to automatically include files within scripts, see also the - <link linkend="ini.auto-prepend-file">auto_prepend_file</link> and + <link linkend="ini.auto-prepend-file">auto_prepend_file</link> and <link linkend="ini.auto-append-file">auto_append_file</link> configuration options in &php.ini;. </para> - + ¬e.language-construct; <simpara> @@ -1621,7 +1621,7 @@ This is a behavior similar to the <function>require</function> statement, with the only difference being that if the code from a file has already been included, it will not be included again. See the documentation for - <function>require</function> for more information on how this statement + <function>require</function> for more information on how this statement works. </para> <para> @@ -1633,8 +1633,8 @@ </para> <para> For examples on using <function>require_once</function> and - <function>include_once</function>, look at the - <ulink url="&url.php.pear;">PEAR</ulink> code included in the + <function>include_once</function>, look at the + <ulink url="&url.php.pear;">PEAR</ulink> code included in the latest PHP source code distributions. </para> <para> @@ -1676,7 +1676,7 @@ See also <function>require</function>, <function>include</function>, <function>include_once</function>, <function>get_required_files</function>, - <function>get_included_files</function>, <function>readfile</function>, and + <function>get_included_files</function>, <function>readfile</function>, and <function>virtual</function>. </para> </sect1> @@ -1688,11 +1688,11 @@ the specified file during the execution of the script. This is a behavior similar to the <function>include</function> statement, with the only difference being that if the code from a file has already - been included, it will not be included again. As the name suggests, + been included, it will not be included again. As the name suggests, it will be included just once. </para> <para> - <function>include_once</function> should be used in cases where + <function>include_once</function> should be used in cases where the same file might be included and evaluated more than once during a particular execution of a script, and you want to be sure that it is included exactly once to avoid problems with function redefinitions,