diff --git a/components/process.rst b/components/process.rst index 670bb9b92ce..355c853105f 100644 --- a/components/process.rst +++ b/components/process.rst @@ -350,6 +350,19 @@ Use :method:`Symfony\\Component\\Process\\Process::disableOutput` and Moreover, you could not pass a callback to the ``start()``, ``run()`` or ``mustRun()`` methods or use ``setIdleTimeout()``. +Finding the Executable PHP Binary +--------------------------------- + +This component also provides a utility class called +:class:`Symfony\\Component\\Process\\PhpExecutableFinder` which returns the +absolute path of the executable PHP binary available on your server:: + + use Symfony\Component\Process\PhpExecutableFinder; + + $phpBinaryFinder = new PhpExecutableFinder(); + $phpBinaryPath = $phpBinaryFinder->find(); + // $phpBinaryPath = '/usr/local/bin/php' (the result will be different on your computer) + .. _`Symfony Issue#5759`: https://github.com/symfony/symfony/issues/5759 .. _`PHP Bug#39992`: https://bugs.php.net/bug.php?id=39992 .. _`exec`: https://en.wikipedia.org/wiki/Exec_(operating_system)