rfc:my_rfc

This is an old revision of the document!


PHP RFC: Your Title Here

Introduction

There are number of INI set/get functions. This RFC proposes deprecation of these functions.

Proposal

Use of ini_set()/ini_get() simplifies/improves PHP. PHP needs no more INI set/get aliases at least, document use of ini_get()/ini_set() in the CODING_STANDARDS.

Pros - Less API, hence simpler API. - Modules will be less buggy.

  i.e. PHP_INI_MH() must handle "state" properly, but it tends to be forgotten, 3rd party modules especially. 

- Consistent coding style/API across modules, both internal and script. - Reduced documentations. INI descriptions are only in INI section. - Less documentations, hence less documentation bugs. - Better documentation. All user needs to know will be in INI section. - Awareness of INI setting use. Users are better to know they are using INI. i.e. All INI values has the same limitations, INI_SYSTEM/INI_PERDIR/INI_USER, stage limitations if any. - (Please point it out more advantages)

Cons - Existing code modifications. (It's E_DEPRECATED. User may ignore.) - (Please point it out more disadvantages)

1. Add plain ini_get/set() usage in CODING_STANDARDS. In the “Code Implementation” session add following standard.

10.  Use ini_set()/ini_get() function when modules need to change INI values. Do not add simple ini_set()/ini_get()
     alias functions.

2. Document INI set/get alias functions.

e.g.

- http://php.net/manual/en/function.session-save-path.php - http://php.net/manual/en/function.session-module-name.php - http://php.net/manual/en/function.session-cache-expire.php - http://php.net/manual/en/function.session-cache-limiter.php - http://php.net/manual/en/function.session-name.php - http://php.net/manual/en/function.gc-enable.php - http://php.net/manual/en/function.set-include-path.php - http://php.net/manual/en/function.set-time-limit.php - http://php.net/manual/en/function.error-reporting.php - http://php.net/manual/en/function.mb-internal-encoding.php - http://php.net/manual/en/function.mb-detect-order.php - http://php.net/manual/en/function.mb-language.php - http://php.net/manual/en/function.iconv-set-encoding.php - And more.

3. Raise E_DEPRICATE errors for INI set/get alias functions.

Backward Incompatible Changes

1. None for CODING_STANDARD documentation.

2. None for deprecation documentation in the manual.

3. E_DEPRECATE error may be ignored

Proposed PHP Version(s)

- PHP 7.0

RFC Impact

To SAPIs

No SAPI impact.

To Existing Extensions

Modules that has INI set/get aliases are affected.

- standard - session - mbstring - iconv - (and more)

To Opcache

No Opcache impact.

New Constants

No constant.

php.ini Defaults

No changes for INI values.

  • hardcoded default values
  • php.ini-development values
  • php.ini-production values

Open Issues

None.

Unaffected PHP Functionality

Functions that are not simple INI set/get aliases are not affected.

Future Scope

None. If proposal 3 (Add E_DEPRECATE error) is rejected, adding E_DEPRECATE error will be future decision.

Proposed Voting Choices

Proposals require 50%+1 majority

Patches and Tests

No patch is prepared as this is a trivial change.

Implementation

After the project is implemented, this section should contain

  1. the version(s) it was merged to
  2. a link to the git commit(s)
  3. a link to the PHP manual entry for the feature

References

Rejected Features

rfc/my_rfc.1422664624.txt.gz · Last modified: 2017/09/22 13:28 (external edit)