Gets the command line to be executed.
public getCommandLine ( ) : string | ||
return | string | The command to execute |
use Symfony\Component\Process\Process; $process = new Process(['ls', '-la']); $process->start(); echo $process->getCommandLine();
use Symfony\Component\Process\Process; $process = new Process('echo "Hello World"'); $process->run(); echo $process->getCommandLine();This code creates a new `Process` object and runs the command `echo "Hello World"`. `getCommandLine()` is then called to return the command-line arguments, which will be `echo "Hello World"`. The package library for the Symfony\Component\Process component is "symfony/process".
public getCommandLine ( ) : string | ||
return | string | The command to execute |