tony2001 Mon Aug 7 13:08:46 2006 UTC
Modified files: /phpdoc/en/language control-structures.xml Log: the example and the requirement it demonstrates are obsolete since PHP3 http://cvs.php.net/viewvc.cgi/phpdoc/en/language/control-structures.xml?r1=1.133&r2=1.134&diff_format=u Index: phpdoc/en/language/control-structures.xml diff -u phpdoc/en/language/control-structures.xml:1.133 phpdoc/en/language/control-structures.xml:1.134 --- phpdoc/en/language/control-structures.xml:1.133 Thu Mar 30 15:01:11 2006 +++ phpdoc/en/language/control-structures.xml Mon Aug 7 13:08:46 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.133 $ --> +<!-- $Revision: 1.134 $ --> <chapter id="language.control-structures"> <title>Control Structures</title> @@ -1454,37 +1454,6 @@ <function>fopen</function> and <function>file</function> for related information. </para> - <para> - Because <function>include</function> and <function>require</function> - are special language constructs, you must enclose them within a statement - block if it's inside a conditional block. - </para> - <para> - <example> - <title>include() and conditional blocks</title> - <programlisting role="php"> -<![CDATA[ -<?php - -// This is WRONG and will not work as desired. -if ($condition) - include $file; -else - include $other; - - -// This is CORRECT. -if ($condition) { - include $file; -} else { - include $other; -} - -?> -]]> - </programlisting> - </example> - </para> <simpara> Handling Returns: It is possible to execute a <function>return</function> statement inside an included file in order to terminate processing in that