Call function and get return...

From: Date: Wed, 16 Aug 2000 08:22:07 +0000
Subject: Call function and get return...
Groups: php.general 
Request: Send a blank email to php-general+get-11944@lists.php.net to get a copy of this message
Hello ! I need to call a function "DoIt" with a function a an argument. This works fine, when calling DoIt("f2();") and using eval($func) in DoIt to call the function (like in the example below): function DoIt($func) { eval($func); } function f1() {} function f2() {} function f3() {} Now I need to get back a return-value from my functions, for example: function f2() { return 2; } But "eval" doesn't return any results... How is it done ? Regards Martin

« previous php.general (#11944) next »