mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Default return values of include (bug #25108)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@164488 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
64c2c97264
commit
fb0b1d0c04
1 changed files with 14 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.98 $ -->
|
||||
<!-- $Revision: 1.99 $ -->
|
||||
<chapter id="language.control-structures">
|
||||
<title>Control Structures</title>
|
||||
|
||||
|
@ -1424,6 +1424,11 @@ if ($condition) {
|
|||
variables within those tags and they will be introduced at whichever point
|
||||
the file was included.
|
||||
</simpara>
|
||||
<simpara>
|
||||
If there is no return statement inside an included file, implicit
|
||||
<literal>return 1;</literal> is added at the end of the file. If the file
|
||||
can't be included, &false; is returned.
|
||||
</simpara>
|
||||
<para>
|
||||
Because <function>include</function> is a special language costruct,
|
||||
parentheses are not needed around its argument. Take care when comparing
|
||||
|
@ -1537,6 +1542,10 @@ echo $bar; // prints 1
|
|||
<ulink url="&url.php.pear;">PEAR</ulink> code included in the
|
||||
latest PHP source code distributions.
|
||||
</para>
|
||||
<para>
|
||||
Return values are the same as with <function>include</function>. If the file
|
||||
was already included, this function returns &true;
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
<para>
|
||||
|
@ -1600,6 +1609,10 @@ require_once("A.php"); // this will include a.php again on Windows! (PHP 4 only)
|
|||
<ulink url="&url.php.pear;">PEAR</ulink> code included in the latest
|
||||
PHP source code distributions.
|
||||
</para>
|
||||
<para>
|
||||
Return values are the same as with <function>include</function>. If the file
|
||||
was already included, this function returns &true;
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue