git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@219236 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
TAKAGI Masahiro 2006-09-01 22:59:45 +00:00
parent 17a283bd6a
commit 98602b0513

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<sect1 id="zend.variables">
<title>Creating Variables</title>
<para>
@ -472,7 +472,7 @@ The index is always an integer.
<entry colname="col1"><function>add_index_stringl(zval *array, uint idx, char
*str, uint length, int duplicate);</function></entry>
<entry colname="col2">Adds a string with the desired
length <envar>length</envar> to the array. This function is faster and binary-safe. Otherwise, behaves like <function>add_index_string()</function>.</entry>
length <envar>length</envar> to the array. This function is faster and binary-safe. Otherwise, behaves like <function>add_index_string</function>.</entry>
</row>
<row>
<entry colname="col1"><function>add_index_zval(zval *array, uint idx, zval *value);</function></entry>
@ -533,7 +533,7 @@ These functions automatically generate a new index based on the highest index fo
<entry colname="col1"><function>add_next_index_stringl(zval *array, char *str,
uint length, int duplicate);</function></entry>
<entry colname="col2">Adds a string with the desired
length <envar>length</envar> to the array. This function is faster and binary-safe. Otherwise, behaves like <function>add_index_string()</function>.</entry>
length <envar>length</envar> to the array. This function is faster and binary-safe. Otherwise, behaves like <function>add_index_string</function>.</entry>
</row>
<row>
<entry colname="col1"><function>add_next_index_zval(zval *array, zval *value);</function></entry>
@ -546,7 +546,7 @@ These functions automatically generate a new index based on the highest index fo
All these functions provide a handy abstraction to Zend's internal hash
API. Of course, you can also use the hash functions directly - for example, if
you already have a <envar>zval</envar> container allocated that you want to
insert into an array. This is done using <function>zend_hash_update()</function>
insert into an array. This is done using <function>zend_hash_update</function>
for associative arrays (see <xref linkend='example.array-add-assoc'/>) and
<function>zend_hash_index_update</function> for indexed arrays
(see <xref linkend='example.array-add-indexed'/>):
@ -951,7 +951,7 @@ int ZEND_REGISTER_RESOURCE(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
return rsrc_id;
</programlisting>
The returned <literal>rsrc_id</literal> uniquly identifies the newly
The returned <literal>rsrc_id</literal> uniquely identifies the newly
registered resource. You can use the macro
<literal>RETURN_RESOURE</literal> to return it to the user:
<programlisting> RETURN_RESOURCE(rsrc_id)</programlisting>