Req #61630 [Opn]: include path with arrays
Edit report at https://bugs.php.net/bug.php?id=61630&edit=1
ID: 61630
Updated by: cmb@php.net
Reported by: php at sebastianmendel dot de
Summary: include path with arrays
Status: Open
Type: Feature/Change Request
Package: PHP options/info functions
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
It seems to me that such functionality can easily be implemented
in userland, if desired.
Previous Comments:
------------------------------------------------------------------------
[2012-04-26 17:58:35] roeitell at gmail dot com
Submitted a patch to allow array input for set_include_path. Patch includes the
re-made function definition for set_include_path: (in basic_functions.c)
* if input is an array, it implodes it with the default path separator
* otherwise, casts it to string and continuous as before
------------------------------------------------------------------------
[2012-04-05 07:17:52] php at sebastianmendel dot de
Description:
------------
Include path handling functions should work with arrays.
The should be an add_include_path() function.
Test script:
---------------
set_include_path(
array(
'/path/to/my/lib',
'/path/to/pear/',
)
);
$arPaths = get_include_path($bReturnAsArray = true);
add_include_path('/path/to/other/lib', INSERT_FIRST|INSERT_LAST);
add_include_path(
array(
'/path/to/other/lib',
'/path/to/pyrus/',
),
INSERT_FIRST|INSERT_LAST
);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61630&edit=1
Thread (4 messages)