Thread: return keyword
View Single Post
Old 06-27-2008, 07:14 PM   #8 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by xenon View Post
What are you talking about?

PHP Code:
function test_func()
{
    return 
'return value of the test function';
}

eval(
'$return = test_func();');

echo 
$return
$return will contain exactly the string returned by the function. So, what is the problem? I really don't see why you would want to do such thing anyway...
I want the eval() inside the function scope.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote