mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
include and return in PHP 4 (bug #30723)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@172298 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
34ebe16c9f
commit
6ae6e45e80
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.109 $ -->
|
||||
<!-- $Revision: 1.110 $ -->
|
||||
<chapter id="language.control-structures">
|
||||
<title>Control Structures</title>
|
||||
|
||||
|
@ -1539,7 +1539,8 @@ echo $bar; // prints 1
|
|||
If there are functions defined in the included file, they can be used in the
|
||||
main file independent if they are before <function>return</function> or after.
|
||||
If the file is included twice, PHP 5 issues fatal error because functions
|
||||
were already declared, while PHP 4 doesn't complain about it.
|
||||
were already declared, while PHP 4 doesn't complain about functions
|
||||
defined after <function>return</function>.
|
||||
It is recommended to use <function>include_once</function> instead of
|
||||
checking if the file was already included and conditionally return inside
|
||||
the included file.
|
||||
|
|
Loading…
Reference in a new issue