Skip to content

Commit 3bf486b

Browse files
author
David Maus
committed
Merge pull request ieure#1 from niclashoyer/ce52384e033af0793290981882dc1cc66f4a150d
Add check for PHP_INCLUDE_PATH environment variable
2 parents b2cb936 + ce52384 commit 3bf486b

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)