From fb0b1d0c048f2e8ab1c3ba87f6c988dc7958174a Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 27 Jul 2004 20:12:11 +0000 Subject: [PATCH] Default return values of include (bug #25108) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@164488 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/control-structures.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/language/control-structures.xml b/language/control-structures.xml index 07ad0f9d29..87a9cd3622 100644 --- a/language/control-structures.xml +++ b/language/control-structures.xml @@ -1,5 +1,5 @@ - + Control Structures @@ -1424,6 +1424,11 @@ if ($condition) { variables within those tags and they will be introduced at whichever point the file was included. + + If there is no return statement inside an included file, implicit + return 1; is added at the end of the file. If the file + can't be included, &false; is returned. + Because include is a special language costruct, parentheses are not needed around its argument. Take care when comparing @@ -1537,6 +1542,10 @@ echo $bar; // prints 1 PEAR code included in the latest PHP source code distributions. + + Return values are the same as with include. If the file + was already included, this function returns &true; + @@ -1600,6 +1609,10 @@ require_once("A.php"); // this will include a.php again on Windows! (PHP 4 only) PEAR code included in the latest PHP source code distributions. + + Return values are the same as with include. If the file + was already included, this function returns &true; +