Skip to content

Commit 7ca9e2e

Browse files
committed
Deploying to gh-pages from @ c2c52d9 🚀
1 parent 76def23 commit 7ca9e2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_sources/php7/internal_types/strings/zend_strings.rst.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ This also brings us to the next topic: refcount management. Rather than using ra
148148
return zend_string_copy(str);
149149

150150
Unlike ``GC_ADDREF()``, the ``zend_string_addref()`` function will handle immutable strings properly. However, the
151-
function that is used most often by far is ``zend_string_copy()``. This function also only increments the refcount,
151+
function that is used most often by far is ``zend_string_copy()``. This function not only increments the refcount,
152152
but also returns the original string. This makes code more readable in practice.
153153

154154
While a ``zend_string_dup()`` function that performs an actual copy of the string (rather than only a refcount

php7/internal_types/strings/zend_strings.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ <h2>Memory management<a class="headerlink" href="#memory-management" title="Link
170170
</pre></div>
171171
</div>
172172
<p>Unlike <code class="docutils literal notranslate"><span class="pre">GC_ADDREF()</span></code>, the <code class="docutils literal notranslate"><span class="pre">zend_string_addref()</span></code> function will handle immutable strings properly. However, the
173-
function that is used most often by far is <code class="docutils literal notranslate"><span class="pre">zend_string_copy()</span></code>. This function also only increments the refcount,
173+
function that is used most often by far is <code class="docutils literal notranslate"><span class="pre">zend_string_copy()</span></code>. This function not only increments the refcount,
174174
but also returns the original string. This makes code more readable in practice.</p>
175175
<p>While a <code class="docutils literal notranslate"><span class="pre">zend_string_dup()</span></code> function that performs an actual copy of the string (rather than only a refcount
176176
increment) also exists, the behavior is often considered confusing, because it only copies non-immutable strings.

0 commit comments

Comments
 (0)