rfc:precise_float_value
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:precise_float_value [2015/09/25 00:00] – yohgaki | rfc:precise_float_value [2016/02/25 01:25] – yohgaki | ||
---|---|---|---|
Line 60: | Line 60: | ||
===== Proposal ===== | ===== Proposal ===== | ||
- | * PHP 7.0: Introduce EG(precision)=-1 and PG(serialize_precision)=-1 that uses zend_dtoa()' | + | * PHP 7.1: Introduce EG(precision)=-1 and PG(serialize_precision)=-1 that uses zend_dtoa()' |
Since JSON is used extensively for web apps, we may have JSON specific INI setting for better compatibility and ease of use. | Since JSON is used extensively for web apps, we may have JSON specific INI setting for better compatibility and ease of use. | ||
Line 123: | Line 123: | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | PHP 7.0 will have 0 mode as the default. var_export()/ | + | PHP 7.1 will have 0 mode as the default. var_export()/ |
FYI: Existing tests passes even when 0 mode is used. | FYI: Existing tests passes even when 0 mode is used. | ||
Line 131: | Line 131: | ||
===== Proposed PHP Version(s) ===== | ===== Proposed PHP Version(s) ===== | ||
- | * PHP 7.0.0 - EG(precision)/ | + | * PHP 7.1.0 - EG(precision)/ |
- | * PHP 5.6.x - JSON uses PG(serialize_precision) for float precision. | + | * PHP 5.6.x/ |
===== RFC Impact ===== | ===== RFC Impact ===== | ||
Line 143: | Line 143: | ||
Standard module | Standard module | ||
- | * serialize(), | + | * serialize(), |
JSON | JSON | ||
- | * json_encode() - PHP7.0: Use PG(serialize_precision) and 0 mode. PHP5.6: Use PG(serialize_precision). | + | * json_encode() - PHP7.1: Use PG(serialize_precision) and 0 mode. PHP5.6/7.0: Use PG(serialize_precision). |
Line 164: | Line 164: | ||
* php.ini-production values : 14 Unmodified | * php.ini-production values : 14 Unmodified | ||
- | serialize_precision(PHP5.6) | + | serialize_precision(PHP5.6/7.0) |
* hardcoded default values : 17 Unmodified | * hardcoded default values : 17 Unmodified | ||
* php.ini-development values : 17 Unmodified | * php.ini-development values : 17 Unmodified | ||
* php.ini-production values : 17 Unmodified | * php.ini-production values : 17 Unmodified | ||
- | serialize_precision(PHP7) | + | serialize_precision(PHP7.1) |
* hardcoded default values : -1 | * hardcoded default values : -1 | ||
* php.ini-development values : -1 | * php.ini-development values : -1 | ||
* php.ini-production values : -1 | * php.ini-production values : -1 | ||
- | json_precision(NEW - PHP7 only) | + | json.precision(NEW - PHP7.1 only) |
* hardcoded default values : -1 | * hardcoded default values : -1 | ||
* php.ini-development values : -1 | * php.ini-development values : -1 | ||
Line 206: | Line 206: | ||
Please choose Yes/No for 0 mode EG(precision)/ | Please choose Yes/No for 0 mode EG(precision)/ | ||
- | <doodle title=" | + | <doodle title=" |
* Yes | * Yes | ||
* No | * No | ||
Line 215: | Line 215: | ||
Please choose your preference whether JSON module should use PG(serialize_precision) or new JSON_G(json_precision). i.e. JSON module has its own precision setting or not. | Please choose your preference whether JSON module should use PG(serialize_precision) or new JSON_G(json_precision). i.e. JSON module has its own precision setting or not. | ||
- | <doodle title=" | + | <doodle title=" |
* Yes | * Yes | ||
* No | * No | ||
Line 228: | Line 228: | ||
* No | * No | ||
</ | </ | ||
+ | |||
+ | Please choose if PHP 7.0's JSON should use PG(serialize_precision) or EG(precision). Currently it uses EG(precision). | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
Line 242: | Line 250: | ||
===== References ===== | ===== References ===== | ||
- | https:// | + | * https:// |
+ | * https:// | ||
+ | * http:// | ||
===== Rejected Features ===== | ===== Rejected Features ===== | ||
Keep this updated with features that were discussed on the mail lists. | Keep this updated with features that were discussed on the mail lists. | ||
rfc/precise_float_value.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1