如何在php的c扩展名中删除类静态属性(默认值:数组)? 代码:
zval httpStatuses;
array_init(&httpStatuses);
zend_declare_property ( cheetah_web_response_ce, "httpStatuses",strlen ( "httpStatuses" ), &httpStatuses, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC );
它显示了我编译时的错误:
Fatal error - Internal zval's can't be arrays, objects or resources
如果它不是静态属性,它可以在__construct函数中初始化。 所以,我需要帮助,谢谢!