I'll elaborate with an example.
$GrannyWasRaped=1;
function wasGrannyRaped()
{
if($GrannyWasRaped == 1)
{
return "Yes!";
}
else
{
return "Nope!";
}
}
function tellMeIfGrannyWasRaped()
{
echo(wasGrannyRaped());
}
Here you can see that it will echo "Yes!" if $GrannyWasRaped is set to 1, or "Nope!" if it is set to 0.
EDIT: I should also mention the function stops running when it sees a return. This is useful for escaping from bigger functions or loops when you've gotten all the data you need, rather than waiting it out (as in Port's code)