dough boy Posted July 15, 2008 Share Posted July 15, 2008 Ok...got a really weird one here. Long story short I need to pass in a call to a function. This call is a call to another class/function. So here is what I have: class Misc extends ClassA { function runFunction($func) { return eval($func); } } class MyClass extends ClassA { function myFunction($vars) { return $data; } } $misc->runFunction("MyClass::myFunction('myValue');") Any thoughts? I run it this way and I get a "Parse Error: syntax error, unexpected $end". If I take out the eval and just manually put the call there and call $misc->runFunction() it works fine. Help!?!?!??!?! Link to comment https://forums.phpfreaks.com/topic/114872-eval-a-function/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.