Edit report at https://bugs.php.net/bug.php?id=32362&edit=1

 ID:                 32362
 Updated by:         ni...@php.net
 Reported by:        ceefour at gauldong dot net
 Summary:            Some functions to manipulate include_path (or any
                     path list in general)
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   All
 PHP Version:        5.0.3
-Assigned To:        
+Assigned To:        nikic
 Block user comment: N
 Private report:     N

 New Comment:

Closing as by now PHP has both PATH_SEPARATOR and DIRECTORY_SEPARATOR. Paths 
can be added to include_path with:

    set_include_path(get_include_path() . PATH_SEPARATOR . 'foobar');

If you want to work on it as an array you can use explode(PATH_SEPARATOR, 
get_include_path()).


Previous Comments:
------------------------------------------------------------------------
[2005-03-18 14:50:32] ceefour at gauldong dot net

Description:
------------
include_path *is* complex. How do you add something to include path without 
detecting the operating system first? How do you remove something from the 
include path?
It would be great if PHP has an API that allows manipulation of include paths 
as array.

include_path is so tied to the operating system platform and many libraries 
have tried to autodetect the platform and map it to a path separator (usually 
';' for Windows and ':' for non-Windows, but you can easily see that even my 
statement is wrong, as is not always the case). How to separate paths in Mac? 
It uses ':' as the path element separator, so? (I don't know the answer).

Adding a constant for path separator ('/', '\', ...) and path list separator 
(';', ':', ...) would partly solve the problem. It'll be even better if there 
are some functions to manipulate them. Of course not tied to include_path, but 
general functions to manipulate any path list, since they're very often used, 
like for manipulating the PATH environment variable, and other stuff.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=32362&edit=1

Reply via email to