note 112515 modified in function.return by googleguy
| From: | googleguy@php.net | Date: | Thu, 02 Jan 2014 23:27:39 +0000 |
| Subject: | note 112515 modified in function.return by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-198093@lists.php.net to get a copy of this message | ||
Note that because PHP processes the file before running it, any functions defined in an included
file will still be available, even if the file is not executed.
Example:
a.php
<?php
include 'b.php';
foo();
?>
b.php
<?php
return;
function foo() {
echo 'foo';
}
?>
Executing a.php will output "foo".
--was--
Note that because PHP processes the file before running it, any functions defined in an included
file will still be available, even if the file is not fully executed.
Example:
a.php
<?php
include 'b.php';
foo();
?>
b.php
<?php
return;
function foo() {
echo 'foo';
}
?>
Executing a.php will output "foo".
http://php.net/manual/en/function.return.php