note 46116 added to function.return
| From: | dualon at freemail dot hu | Date: | Wed, 29 Sep 2004 21:46:48 +0000 |
| Subject: | note 46116 added to function.return | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77586@lists.php.net to get a copy of this message | ||
Be aware, the use of return() can product interesting results (seems to prevent the execution of the
following code in the function):
function test()
{
$var = 'Variable';
return $var;
if ( isset($var) )
{
echo 'Variable is set'; // can be return too
}
}
echo test(); // displays "Variable", not "Variable is set"
----
Manual Page -- http://www.php.net/manual/en/function.return.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46116
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46116&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46116&report=yes
Search -- http://master.php.net/manage/user-notes.php