Skip to content

Documented the PhpExecutableFinder utility #9182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions components/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down