@@ -192,6 +192,7 @@ static const zend_function_entry zend_test_trait_methods[] = {
192
192
PHP_MINIT_FUNCTION (zend_test )
193
193
{
194
194
zend_class_entry class_entry ;
195
+ zend_bool persistent_str = EG (current_module )-> type == MODULE_PERSISTENT ;
195
196
196
197
INIT_CLASS_ENTRY (class_entry , "_ZendTestInterface" , NULL );
197
198
zend_test_interface = zend_register_internal_interface (& class_entry );
@@ -205,7 +206,7 @@ PHP_MINIT_FUNCTION(zend_test)
205
206
zend_declare_property_null (zend_test_class , "_StaticProp" , sizeof ("_StaticProp" ) - 1 , ZEND_ACC_STATIC );
206
207
207
208
{
208
- zend_string * name = zend_string_init ("intProp" , sizeof ("intProp" ) - 1 , 1 );
209
+ zend_string * name = zend_string_init ("intProp" , sizeof ("intProp" ) - 1 , persistent_str );
209
210
zval val ;
210
211
ZVAL_LONG (& val , 123 );
211
212
zend_declare_typed_property (
@@ -214,7 +215,7 @@ PHP_MINIT_FUNCTION(zend_test)
214
215
}
215
216
216
217
{
217
- zend_string * name = zend_string_init ("classProp" , sizeof ("classProp" ) - 1 , 1 );
218
+ zend_string * name = zend_string_init ("classProp" , sizeof ("classProp" ) - 1 , persistent_str );
218
219
zend_string * class_name = zend_string_init ("stdClass" , sizeof ("stdClass" ) - 1 , 1 );
219
220
zval val ;
220
221
ZVAL_NULL (& val );
@@ -225,7 +226,7 @@ PHP_MINIT_FUNCTION(zend_test)
225
226
}
226
227
227
228
{
228
- zend_string * name = zend_string_init ("staticIntProp" , sizeof ("staticIntProp" ) - 1 , 1 );
229
+ zend_string * name = zend_string_init ("staticIntProp" , sizeof ("staticIntProp" ) - 1 , persistent_str );
229
230
zval val ;
230
231
ZVAL_LONG (& val , 123 );
231
232
zend_declare_typed_property (
0 commit comments