PHP RFC: 64 bit platform improvements for PHP-NG
- Version: 0.9
- Date: 2014-05-20
- Author: Nikita Popov firstname.lastname@example.org
- Status: Draft
This RFC describes the decisions reached regarding improved 64bit support, following the discussion of the previous size_t_and_int64_next RFC.
The 64bit changes described in the following will be added to the phpng branch once it is more stable.
The following changes will be made:
- 64bit integers (in zvals and related areas) will be used on Win64 and other LLP64 platforms. This means that many current uses of
longwill be replaced with a type like
zend_longwhich is 64bit large on all 64bit platforms.
size_twill be used for string lengths in
zend_string. This means that string sizes will be 64bit on 64bit platforms.
- 64bit sizes/integers may be used in some other places as well, as long as the usage does not significantly increase memory usage. E.g. file/stream offsets and ini settings like
memory_limitshould support 64bit numbers.
The following changes will not be made:
- Use of
size_tfor all lengths. In particular hashtables will always use 32bit lengths. Line numbers will be stored in a 32bit type. Special names (like argument or class names) will also use 32bit lengths, where possible.
The expected memory impact of these changes is around 1%. We are okay with that.
Unclear as of now: Will we be performing renames like
IS_INT along the way? I prefer not (Nikita).
Proposed Voting Choices
Do you agree that 64bit platform improvements as described above should be implemented?