php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61630 include path with arrays
Submitted: 2012-04-05 07:17 UTC Modified: 2015-08-31 17:52 UTC
Votes:2
Avg. Score:2.5 ± 0.5
Reproduced:0 of 0 (0.0%)
From: php at sebastianmendel dot de Assigned:
Status: Open Package: PHP options/info functions
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at sebastianmendel dot de
New email:
PHP Version: OS:

 

 [2012-04-05 07:17 UTC] 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
);


Patches

set_include_path-array_input (last revision 2012-04-26 17:55 UTC by roeitell at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-26 17:58 UTC] 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
 [2015-08-31 17:52 UTC] cmb@php.net
It seems to me that such functionality can easily be implemented
in userland, if desired.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat May 25 22:01:26 2019 UTC