Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cbd6e2b

Browse filesBrowse files
committed
Documented the PhpExecutableFinder utility
1 parent b749bf0 commit cbd6e2b
Copy full SHA for cbd6e2b

File tree

Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed

‎components/process.rst

Copy file name to clipboardExpand all lines: components/process.rst
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,19 @@ Use :method:`Symfony\\Component\\Process\\Process::disableOutput` and
350350
Moreover, you could not pass a callback to the ``start()``, ``run()`` or ``mustRun()``
351351
methods or use ``setIdleTimeout()``.
352352

353+
Finding the Executable PHP Binary
354+
---------------------------------
355+
356+
This component also provides a utility class called
357+
:class:`Symfony\\Component\\Process\\PhpExecutableFinder` which returns the
358+
absolute path of the executable PHP binary available on your server::
359+
360+
use Symfony\Component\Process\PhpExecutableFinder;
361+
362+
$phpBinaryFinder = new PhpExecutableFinder();
363+
$phpBinaryPath = $phpBinaryFinder->find();
364+
// $phpBinaryPath = '/usr/local/bin/php' (the result will be different on your computer)
365+
353366
.. _`Symfony Issue#5759`: https://github.com/symfony/symfony/issues/5759
354367
.. _`PHP Bug#39992`: https://bugs.php.net/bug.php?id=39992
355368
.. _`exec`: https://en.wikipedia.org/wiki/Exec_(operating_system)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.