Hello everyone, 

 My name is David. I'm working on the refactoring of a PHP extension from 
"Zephir" language to a cleaner C language output. 


 I came across the fact that the extension uses a lot of "static" zend_string.  
No I want to convert those static zend_string  into the intern string. 


 From what I read today based on PHP internal book website and PHP Source 
online, calling a Zen's new interest string function create a string whose 
value is registered into a hash table.  And then on a request in it this or 
that send interned string is then retrieved from the hash table instead of 
creating a new Zen string. Apart from the fact that every every news and intern 
strings have an immutable ref count.  


 My doubt is the following: 


 * Does ref counting increments/decrements when you create a Zend string using 
the static keyword?  
 * Assigning a new zend_string as interned zend_string, when the flag 
"IS_Interned_STRING" (if I remember correctly), the string is kinda garbage 
collected? (Do I need to free the string)? 


 Thanks for your support. 
 David. 

Reply via email to