PHP RFC: PHP Array API simplification


Adding values to PHP Array style HashTables is already very easy:

add_assoc_long(arr, "life", 42);
add_index_string(arr, 7, "A lucky number");
add_next_index_double(arr, 3.1415926535);

This header file provides similar convenience wrappers to the zend_hash_(index_)_(find|exists|del) functions to ease extension writing.

Self-documented implementation

Backward Incompatible Changes

None, it's a header. My intention at this point is to put this in main/php_array.h and include it in the installed headers target.

Proposed PHP Version(s)

5.6, though non-bundled extensions could easily drop this file into their packages and use it on any PHP version >= 4.0

Proposed Voting Choices

Could include this in Zend/ instead of main/…

rfc/php-array-api.txt · Last modified: 2013/04/03 04:47 by pollita