Questions about how php extended programming returns Arrays-PHP source code

Source: Internet
Author: User
Ec (2); found the answer in zend.com and provided a set of examples. Download here: Responses returns an array PHP_FUNCTION (array_experiments) {zval * new_element; MAKE_STD_ZVAL (new_element ); array_init (ret script ec (2); script

I found the answer at zend.com and provided a group of examples, download here: http://www.zend.com/apidoc/examples.tar.gz
Returns an array.
PHP_FUNCTION (array_experiments)
{
Zval * new_element;
MAKE_STD_ZVAL (new_element );
Array_init (return_value );
ZVAL_LONG (new_element, 10 );
Zend_hash_index_update (HASH_OF (return_value), 3, (void *) & new_element, sizeof (zval *), NULL );
Add_next_index_long (return_value, 20 );
}
For specific functions, see the zend api in the php manual. However, this part of content has not been translated into Chinese... I can't read Kingsoft, but it's too bad to read English. I hope that the senior man will have nothing to translate... haha

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.