rfc:my_rfc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:my_rfc [2015/01/31 00:59] – yohgaki | rfc:my_rfc [2022/04/05 18:30] (current) – this is the dummy URL on the howto page; make clear that it's not in any way a real URL imsop | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Deprecate INI set/get aliases ====== | + | **This is not your RFC.** |
- | | + | |
- | | + | |
- | * Author: Yasuo Ohgaki < | + | |
- | * Status: Under Discussion | + | |
- | * First Published at: http:// | + | |
- | + | ||
- | ===== Introduction ===== | + | |
- | + | ||
- | There are number of INI set/get functions. | + | |
- | + | ||
- | Use of ini_set()/ | + | |
- | + | ||
- | + | ||
- | **Pros** | + | |
- | - Less API, hence simpler API. | + | |
- | - Modules will be less buggy. i.e. PHP_INI_MH() must handle " | + | |
- | - Consistent coding style/API across modules, both internal and script. | + | |
- | - Reduced documentations. INI descriptions are only in INI section. | + | |
- | - Less documentations, | + | |
- | - 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, | + | |
- | - (Please point it out more advantages) | + | |
- | + | ||
- | **Cons** | + | |
- | - Existing code modifications. (It's E_DEPRECATED. User may ignore.) | + | |
- | - (Please point it out more disadvantages) | + | |
- | + | ||
- | + | ||
- | **Before** | + | |
- | <code php> | + | |
- | <?php | + | |
- | // Setup environment | + | |
- | session_cache_limiter(' | + | |
- | session_name(' | + | |
- | session_save_path('/ | + | |
- | ini_set(' | + | |
- | ini_set(' | + | |
- | ini_set(' | + | |
- | mb_internal_encoding(' | + | |
- | </ | + | |
- | + | ||
- | **After** | + | |
- | <code php> | + | |
- | <?php | + | |
- | // Setup environment | + | |
- | ini_set(' | + | |
- | ini_set(' | + | |
- | ini_set(' | + | |
- | ini_set(' | + | |
- | ini_set(' | + | |
- | ini_set(' | + | |
- | ini_set(' | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | **From pre RFC discussion: | + | |
- | + | ||
- | removing or disrupting functions without a very good reason | + | |
- | (such as, functionality going away or this function is abused or is | + | |
- | broken in many use cases) is wrong. These functions don't seem broken, | + | |
- | they just do something that you can do in another way. I don't think it | + | |
- | is necessary to deprecated them. (Stas) | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ===== Proposal ===== | + | |
- | + | ||
- | There are 2 documentation and 1 code change proposal. | + | |
- | + | ||
- | 1. Add plain ini_get/ | + | |
- | + | ||
- | 10. Use ini_set()/ | + | |
- | alias functions. | + | |
- | + | ||
- | 2. Document INI set/get alias functions in the **PHP Manual**. | + | |
- | + | ||
- | e.g. | + | |
- | + | ||
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - http:// | + | |
- | - And more. | + | |
- | + | ||
- | 3. Add **E_DEPRICATED** errors for INI set/get alias functions. | + | |
- | + | ||
- | + | ||
- | ===== Backward Incompatible Changes ===== | + | |
- | + | ||
- | 1. None for CODING_STANDARD documentation. | + | |
- | + | ||
- | 2. None for deprecation documentation in the PHP manual. | + | |
- | + | ||
- | 3. E_DEPRECATED 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. | + | |
- | + | ||
- | | + | |
- | | + | |
- | * php.ini-production values | + | |
- | + | ||
- | ===== Open Issues ===== | + | |
- | + | ||
- | Decided exceptions. Candidates are | + | |
- | + | ||
- | - Zend/Core functions that changes INI. e.g. gc_enable. | + | |
- | + | ||
- | + | ||
- | ===== 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, | + | |
- | - the version(s) it was merged to | + | |
- | - a link to the git commit(s) | + | |
- | - a link to the PHP manual entry for the feature | + | |
- | + | ||
- | ===== References ===== | + | |
- | + | ||
- | + | ||
- | + | ||
- | ===== Rejected Features ===== | + | |
- | + | ||
+ | If you came here from the [[rfc: | ||
+ | If you came here looking for //someone else's RFC//, look at [[:rfc|the RFC index page]]. |
rfc/my_rfc.1422665978.txt.gz · Last modified: 2017/09/22 13:28 (external edit)