I found a solution to this problem, It's basically getting all running processes and searching for "tor" among them(based on Bass Jobsen's comment).
That's the code:
Note: this code was tested in Ubuntu only, but It should work on most Linux OS'es.
function isRunning()
{
//Get all running processes and search for "tor" within them
//The "[" and "]" are used to execlude ps and grep from the returned result.
$CLIResult = exec('ps aux | grep -w [t]or');
//If no processes was found(= Tor is not running..)
return empty($CLIResult);
}