Home > Backend Development > PHP Tutorial > PHP扩展 怎么访问常量属性

PHP扩展 怎么访问常量属性

WBOY
Release: 2016-06-06 20:49:15
Original
1034 people have browsed it

请问:在php扩展中用zend_declare_class_constant_stringl定义的常量属性 怎么访问? 我用zend_read_static_propertyzend_read_property都不行?

回复内容:

请问:在php扩展中用zend_declare_class_constant_stringl定义的常量属性 怎么访问? 我用zend_read_static_propertyzend_read_property都不行?

<code class="lang-cpp">ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSRMLS_DC);
ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, zend_class_entry *scope, ulong flags TSRMLS_DC);
</code>
Copy after login
Related labels:
php
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