From 954972076c7b5868ce02ee176a767e5ff3192ed6 Mon Sep 17 00:00:00 2001 From: Dallas Wang Date: Tue, 9 Aug 2005 18:34:43 +0000 Subject: [PATCH] Change expr to expression git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@192883 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/control-structures.xml | 82 ++++++++++++++++----------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/language/control-structures.xml b/language/control-structures.xml index 84db92080f..d4fbca8dd6 100644 --- a/language/control-structures.xml +++ b/language/control-structures.xml @@ -1,5 +1,5 @@ - + Control Structures @@ -34,9 +34,9 @@ if (expression) As described in the section about - expressions, expr is evaluated to its - Boolean value. If expr evaluates to &true;, - PHP will execute statement, and if it evaluates + expressions, expression is evaluated to its + Boolean value. If expression evaluates to &true;, + PHP will execute statement, and if it evaluates to &false; - it'll ignore it. More information about what values evaluate to &false; can be found in the 'Converting to boolean' @@ -780,7 +780,7 @@ while ($i++ < 5) { Omitting the semicolon after continue 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. @@ -930,7 +930,7 @@ case 2: Here, if $i is equal to 0, PHP would execute all of the echo statements! If $i 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 $i is equal to 2. Thus, it is important not to forget break statements (even though you may want to avoid supplying them on purpose under @@ -1060,7 +1060,7 @@ declare (directive) directive block. - The declare construct can also be used in the global + The declare construct can also be used in the global scope, affecting all code following it. @@ -1093,7 +1093,7 @@ declare(ticks=1); The event(s) that occur on each tick are specified using the - register_tick_function. See the example + register_tick_function. See the example below for more details. Note that more than one event can occur for each tick. @@ -1178,7 +1178,7 @@ print_r(profile(TRUE)); named by the auto_prepend_file or auto_append_file - configuration options in &php.ini;, + configuration options in &php.ini;, then that script file's execution is ended. For more information, see - require includes and evaluates a specific file. - Detailed information on how this inclusion works is described in the + require includes and evaluates a specific file. + Detailed information on how this inclusion works is described in the documentation for include. - require and include - are identical in every way except how they handle failure. - include produces a - Warning while + require and include + are identical in every way except how they handle failure. + include produces a + Warning while require results in a - Fatal Error. In other words, don't hesitate to use - require if you want a missing file to halt processing + Fatal Error. In other words, don't hesitate to use + require if you want a missing file to halt processing of the page. include does not behave this way, the script will continue regardless. Be sure to have an appropriate include_path setting as well. @@ -1269,15 +1269,15 @@ require ('somefile.txt'); - + ¬e.language-construct; - + &warn.no-win32-fopen-wrapper; - + See also include, require_once, - include_once, eval, - file, readfile, + include_once, eval, + file, readfile, virtual and include_path. @@ -1291,12 +1291,12 @@ require ('somefile.txt'); The documentation below also applies to require. The two constructs are identical in every way except how they handle - failure. include produces a + failure. include produces a Warning while require results in a Fatal Error. - In other words, use require if you want - a missing file to halt processing of the page. include does - not behave this way, the script will continue regardless. Be sure to have an + In other words, use require if you want + a missing file to halt processing of the page. include does + not behave this way, the script will continue regardless. Be sure to have an appropriate include_path 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 @@ include 'file.php'; // Works. See also Remote files, - fopen and file for related + fopen and file for related information. @@ -1508,7 +1508,7 @@ if ((include 'vars.php') == 'OK') { In PHP 3, the return may not appear inside a block unless it's - a function block, in which case the return applies + a function block, in which case the return applies to that function and not the whole file. @@ -1551,9 +1551,9 @@ echo $bar; // prints 1 - $bar is the value 1 because the include - was successful. Notice the difference between the above examples. The first uses - return within the included file while the other does not. + $bar is the value 1 because the include + was successful. Notice the difference between the above examples. The first uses + return within the included file while the other does not. If the file can't be included, &false; is returned and E_WARNING is issued. @@ -1568,8 +1568,8 @@ echo $bar; // prints 1 the included file. - Another way to "include" a PHP file into a variable is to capture the - output by using the Output Control + Another way to "include" a PHP file into a variable is to capture the + output by using the Output Control Functions with include. For example: @@ -1598,11 +1598,11 @@ function get_include_contents($filename) { In order to automatically include files within scripts, see also the - auto_prepend_file and + auto_prepend_file and auto_append_file configuration options in &php.ini;. - + ¬e.language-construct; @@ -1621,7 +1621,7 @@ function get_include_contents($filename) { This is a behavior similar to the require 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 - require for more information on how this statement + require for more information on how this statement works. @@ -1633,8 +1633,8 @@ function get_include_contents($filename) { For examples on using require_once and - include_once, look at the - PEAR code included in the + include_once, look at the + PEAR code included in the latest PHP source code distributions. @@ -1676,7 +1676,7 @@ require_once("A.php"); // this will include a.php again on Windows! (PHP 4 only) See also require, include, include_once, get_required_files, - get_included_files, readfile, and + get_included_files, readfile, and virtual. @@ -1688,11 +1688,11 @@ require_once("A.php"); // this will include a.php again on Windows! (PHP 4 only) the specified file during the execution of the script. This is a behavior similar to the include 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. - include_once should be used in cases where + include_once 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,