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: 2021-04-01 16:31 UTC
Votes:2
Avg. Score:2.5 ± 0.5
Reproduced:0 of 0 (0.0%)
From: php at sebastianmendel dot de Assigned: cmb (profile)
Status: Wont fix Package: PHP options/info functions
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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)

Pull Requests

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.
 [2021-04-01 16:31 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-04-01 16:31 UTC] cmb@php.net
Well, this request really doesn't make sense to me.  If you still
feel that this should be implemented, please pursue the RFC
process[1].

[1] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC