Macro for php expansion return value in zend engine

WBOY
Release: 2016-07-29 09:07:21
Original
1885 people have browsed it

ZEND_API provides parameter return method

Set the return value and end the function Set the return value Macro return type and parameters
RETURN_LONG(l) RETVAL_LONG(l) Integer
RETURN_BOOL(b) RETVAL_BOOL(b) Boolean number (1 or 0)
RETURN_NULL() RETVAL_NULL() NULL
RETURN_DOUBLE(d) RETVAL_DOUBLE(d) Floating point number
RETURN_STRING(s, dup) RETVAL_STRING(s, dup) String. If dup is 1, the engine will call estrdup() to repeat s, using copy. If dup is 0, use s
RETURN_STRINGL(s, l, dup) RETVAL_STRINGL(s, l, dup) a string value of length l. Same as the previous macro, but faster because the length of s is specified.
RETURN_TRUE RETVAL_TRUE Returns boolean true. Notice that this macro has no parentheses.
RETURN_FALSE RETVAL_FALSE Returns boolean false. Notice that this macro has no parentheses.
RETURN_RESOURCE(r) RETVAL_RESOURCE(r) Resource handle.

The above introduces the macro of the PHP expansion return value in the zend engine, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!