When we using Symfony\Component\Process\Process
, the command run as who?
I tried the command whoami
through Process
, but it return void???
$return = exec('whoami');
echo $return."\n"; // return [myname]
$process = new Process('whoami'); // The symfony process
echo $process->getOutput(); // return nothing @_@