Re: Is there a mapping between "access level" from output ini_get_all() and constants HP_INI_USER, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_ALL in
official docs?
| From: | Peter Cowburn | Date: | Wed, 08 Oct 2014 20:24:45 +0000 |
| Subject: | Re: Is there a mapping between "access level" from output ini_get_all() and constants HP_INI_USER, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_ALL in official docs? |
||
| References: | 1 2 3 4 5 6 7 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969385221@lists.php.net to get a copy of this message | ||
On 8 October 2014 20:44, Rowan Collins <rowan.collins@gmail.com> wrote:
> On 8 October 2014 20:19:35 GMT+01:00, Peter Cowburn <
> petercowburn@gmail.com> wrote:
> >On 8 October 2014 17:27, Rowan Collins <rowan.collins@gmail.com> wrote:
> >
> >> Peter Cowburn wrote (on 08/10/2014):
> >>
> >>> Those PHP_INI_* "modes" are made available to PHP scripts via INI_*
> >>> constants: INI_USER, INI_PERDIR, INI_SYSTEM, INI_ALL.
> >>>
> >>> They have been available "forever"... see
> >>> http://3v4l.org/a1JeF
> >>>
> >>
> >> Hm, in that case it probably *is* a documentation problem - why are
> >they
> >> labelled PHP_INI_* in the docs, but INI_* in the engine?
> >
> >
> >They are PHP_INI_* in the source (mapping from ZEND_INI_*). My guess
> >would
> >be that the PHP_INI_* names are used because that is most familiar, due
> >to
> >them being the names in the source code.
>
> Most familiar to who?
Documentors, using "the source” to guide them.
> And what's this about yet a third set of names with ZEND_?
>
E.g. http://lxr.php.net/xref/PHP_TRUNK/main/php_ini.h#45
>
> Sounds like a mess that needs tidying up, frankly. Obviously either set of
> names *could* be changed, but since the userland constants have always been
> called that is there a good reason for the user-focused documentation *not*
> to be edited to match? Anyone writing an extension in C is used to having
> to look up equivalent names for all sorts of userland features.
>
>
If you’re getting the itch to tidy up, then by all means have a crack at
it! I can see the attraction of making the documentation match the
available constants.