|
|
|
|
| Tutorial |
Chapter 9 Extending PHP 4.0: Hacking the Core of PHP
Table 9.9 Zend’s API for Indexed Arrays, Part 1
Function Description
add_index_long Adds an element of type long.
(zval *array, uint idx, long n);
add_index_unset Adds an unset element.
(zval *array, uint idx);
add_index_bool Adds a Boolean element.
(zval *array, uint idx, int b);
add_index_resource Adds a resource to the array.
(zval *array, uint idx, int r);
add_index_double Adds a floating-point value.
(zval *array, uint idx, double d);
add_index_string(zval *array, Adds a string to the array.The flag duplicate
uint idx, char *str, int duplicate); specifies whether the string contents have to be
copied to Zend internal memory.
add_index_stringl(zval *array, Adds a string with the desired length length
uint idx, char *str, uint to the array.This function is faster and
length, int duplicate); binary-safe. Otherwise, behaves like
add_index_string().
Note: The functions in Table 9.10 all operate on the array array.These functions
automatically generate a new index based on the highest index found in the array.
Table 9.10 Zend’s API for Indexed Arrays, Part 2
Function Description
add_next_index_long Adds an element of type long.
(zval *array, long n);
add_next_index_unset(zval *array); Adds an unset element.
add_next_index_bool Adds a Boolean element.
(zval *array, int b);
add_next_index_resource Adds a resource to the array.
(zval *array, int r);
add_next_index_double Adds a floating-point value.
(zval *array, double d);
add_next_index_string(zval *array, Adds a string to the array.The flag duplicate
char *str, int duplicate); specifies whether the string contents have to be
copied to Zend internal memory.
add_next_index_stringl(zval *array, Adds a string with the desired length length
char *str, uint length, int to the array.This function is faster and
duplicate); binary-safe. Otherwise, behaves like
add_index_string().
|
|
|
|
|
|
| Link Partners: Asia florist, Flowers to India, Hong kong flowers, Site submit, Cheap web hosting, China florist, Japan florist |
|