You need the eval function? http://php.net/manual/en/function.eval.php Be aware of the dangers coming with using it.
You may want to try Exec() if you're trying to execute a string as a command-line action. Another thing you have to worry about is that if you're trying to start programs on the Windows desktop with PHP using the "Eval" or "Exec" commands and you're running Apache, you will need to go into the Services application, double-click on the Apache service, click on the "Log On" tab, click the "Local System Account" radio button and check the "Allow service to interact with desktop" checkbox. If you don't, Windows-based apps will only run in the background but NOT ever appear on the desktop. Ran into that problem a few years back and it took me weeks to figure it out. Good luck!