PhpProcess
class PhpProcess extends Process
PhpProcess runs a PHP script in an independent process.
$p = new PhpProcess(''); $p->run(); print $p->getOutput()."\n";
Methods
__construct(string $script, string $cwd = null, array $env = null, int $timeout = 60) | ||
setPhpBinary($php) Sets the path to the PHP binary to use. | ||
start(callable $callback = null, array $env = array()) {@inheritdoc} |
Details
__construct(string $script, string $cwd = null, array $env = null, int $timeout = 60)
Parameters
string | $script | The PHP script to run (as a string) |
string | $cwd | The working directory or null to use the working dir of the current PHP process |
array | $env | The environment variables or null to use the same environment as the current PHP process |
int | $timeout | The timeout in seconds |
setPhpBinary($php)
Sets the path to the PHP binary to use.
Parameters
$php |
start(callable $callback = null, array $env = array())
{@inheritdoc}
Parameters
callable | $callback | |
array | $env |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Process/PhpProcess.html