Skip to content

Commit ce52384

Browse files
committed
Added check for PHP_INCLUDE_PATH environment variable.
The binary wrapper /scripts/php-repl will now if the environment variable PHP_INCLUDE_PATH is set and add it to the include_path php.ini directive.
1 parent f4e0c58 commit ce52384

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/php-repl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
* @filesource
1717
*/
1818

19+
// Add environment variable PHP_INCLUDE_PATH to include_path if it exists.
20+
$includePath = getenv('PHP_INCLUDE_PATH');
21+
if ($includePath !== false) {
22+
set_include_path(get_include_path().':'.getenv('PHP_INCLUDE_PATH'));
23+
}
24+
1925
require_once 'PHP/Repl.php';
2026
$__repl__ = new PHP_Repl();
2127
$__repl__->run();

0 commit comments

Comments
 (0)