We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
link
PHP_FUNCTION(hello_world) { Z_TYPE_P(return_value) = IS_STRING; Z_STR_P(return_value) = zend_string_init("hello world!", strlen(""hello world!"), 0); }; /* ... */ PHP_FE(hello_world, NULL) /* ... */
Above Z_TYPE_P(return_value) = IS_STRING;
#define Z_TYPE_P(zval_p) Z_TYPE((zval_p)) #define Z_TYPE(zval) zval_get_type(&(zval)) //获取zval类型 static zend_always_inline zend_uchar zval_get_type(const zval pz) { return pz->u1.v.type; }
this way is it wrong?
The text was updated successfully, but these errors were encountered:
Yeah, this doesn't work. This was taken over from the PHP 5 version, where this used to work. In PHP 7 one should use ZVAL_STR or ZVAL_STRING.
ZVAL_STR
ZVAL_STRING
Sorry, something went wrong.
No branches or pull requests
link
Above Z_TYPE_P(return_value) = IS_STRING;
#define Z_TYPE_P(zval_p) Z_TYPE((zval_p))
#define Z_TYPE(zval) zval_get_type(&(zval)) //获取zval类型
static zend_always_inline zend_uchar zval_get_type(const zval pz) {
return pz->u1.v.type;
}
this way is it wrong?
The text was updated successfully, but these errors were encountered: