php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66620 Wrong separator for php_ini_scanned_files() files
Submitted: 2014-01-31 19:50 UTC Modified: 2014-02-01 18:55 UTC
From: miloslav dot hula at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2014-01-31 19:50 UTC] miloslav dot hula at gmail dot com
Description:
------------
Manual page http://cz2.php.net/manual/en/function.php-ini-scanned-files.php talks about: "returns a comma-separated list" and example is

explode(',', $filelist)

But separator is ",\n", not only comma. Example should be:

explode(",\n", $filelist)


Actual behaviour is used in php-src/Make.global file:
https://github.com/php/php-src/blob/28e0a2129bf932af8e74ab7b1040adbad34af3bd/Makefile.global#L96

Following BUG metion that:
https://bugs.php.net/bug.php?id=20267&edit=2


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-01 09:06 UTC] krakjoe@php.net
-Status: Open +Status: Not a bug
 [2014-02-01 09:06 UTC] krakjoe@php.net
The documentation states clearly the format of the output:

> Returns a comma-separated string of .ini files on success. Each comma is followed by a newline.

The example code produces the correct and desired result.

Not a bug ...
 [2014-02-01 18:55 UTC] miloslav dot hula at gmail dot com
I was wrong, I'm sorry. But it is still confusing.

Description section says: "php_ini_scanned_files() returns a comma-separated list of configuration files..."

Return value section says: "Returns a comma-separated string of .ini files on success. Each comma is followed by a newline."

But newline is after last item too, not only after comma.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC