execute drush command from devel/php drupal
Someone tried to create a module to provide shell access from within a Drupal site, but it was never fully debugged. See the Drupal Terminal project.  Perhaps there have been advances in the jQuery terminal that might make it easier to get this working if someone revisited it.

If you want to exec Drush from within php, it is generally better to use drush_invoke_process() rather than exec("drush ...").

$values = drush_invoke_process("@site", "cc", array("all"), array("verbose"));


If you are just running a one-off command and you don't care about the command results, then exec("drush ...") is fine, though.