[DOC-CVS] [doc-en] master: Fix incorrect function name and description for xdiff_string_rabdiff() (#4996)

[email protected] (Louis-Arnaud via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2025-11-18T14:33:59Z

Commit: https://github.com/php/doc-en/commit/198702020219835de11dc3064b7dc0590361ecab
Raw diff: https://github.com/php/doc-en/commit/198702020219835de11dc3064b7dc0590361ecab.diff

Fix incorrect function name and description for xdiff_string_rabdiff() (#4996)

Changed paths:
  M  reference/xdiff/functions/xdiff-string-rabdiff.xml


Diff:

diff --git a/reference/xdiff/functions/xdiff-string-rabdiff.xml b/reference/xdiff/functions/xdiff-string-rabdiff.xml
index 56c3ebcf0edd..9f5325f42924 100644
--- a/reference/xdiff/functions/xdiff-string-rabdiff.xml
+++ b/reference/xdiff/functions/xdiff-string-rabdiff.xml
@@ -1,29 +1,34 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
 <refentry xml:id="function.xdiff-string-rabdiff" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
  <refnamediv>
   <refname>xdiff_string_rabdiff</refname>
-  <refpurpose>Make binary diff of two strings using the Rabin's polynomial fingerprinting algorithm</refpurpose>
+  <refpurpose>
+   Make a binary diff of two strings using the Rabin's polynomial fingerprinting algorithm
+  </refpurpose>
  </refnamediv>
- 
+
  <refsect1 role="description">
   &reftitle.description;
   <methodsynopsis>
-   <type>string</type><methodname>xdiff_string_bdiff</methodname>
+   <type>string|false</type><methodname>xdiff_string_rabdiff</methodname>
    <methodparam><type>string</type><parameter>old_data</parameter></methodparam>
    <methodparam><type>string</type><parameter>new_data</parameter></methodparam>
   </methodsynopsis>
   <para>
-   Makes a binary diff of two strings and returns the result.
-   The difference between this function and <function>xdiff_string_bdiff</function> is different
-   algorithm used which should result in faster execution and smaller diff produced.
-   This function works with both text and binary data. Resulting patch
-   can be later applied using <function>xdiff_string_bpatch</function>/<function>xdiff_file_bpatch</function>.
+   Makes a binary diff of two strings using the Rabin's polynomial fingerprinting algorithm implemented by
+   <link xlink:href="&url.xdiff;">libxdiff</link>. Compared to
+   <function>xdiff_string_bdiff</function>, this algorithm generally produces smaller diffs and operates faster,
+   while remaining fully compatible with <function>xdiff_string_bpatch</function> and
+   <function>xdiff_file_bpatch</function> for applying patches.
+  </para>
+  <para>
+   This function can be used with both text and binary data. The resulting diff data can later be
+   applied to recreate the new version from the old one.
   </para>
   <para>
-   For more details about differences between algorithm used please check <link xlink:href="&url.xdiff;">libxdiff</link> 
-   website.
+   For further information about the algorithm, see the
+   <link xlink:href="https://www.xmailserver.org/xdiff-lib.html">libxdiff documentation</link>.
   </para>
  </refsect1>
 
@@ -35,7 +40,7 @@
      <term><parameter>old_data</parameter></term>
      <listitem>
       <para>
-       First string with binary data. It acts as "old" data.
+       The first string containing the "old" binary data.
       </para>
      </listitem>
     </varlistentry>
@@ -43,7 +48,7 @@
      <term><parameter>new_data</parameter></term>
      <listitem>
       <para>
-       Second string with binary data. It acts as "new" data.
+       The second string containing the "new" binary data.
       </para>
      </listitem>
     </varlistentry>
@@ -54,8 +59,27 @@
  <refsect1 role="returnvalues">
   &reftitle.returnvalues;
   <para>
-   Returns string with binary diff containing differences between "old" and "new"
-   data or &false; if an internal error occurred.
+   Returns a binary diff string containing the differences between the old and new data,&return.falseforfailure;.
+  </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+  &reftitle.examples;
+  <para>
+   <example>
+    <title>Creation of a binary diff between two strings</title>
+    <programlisting role="php">
+     <![CDATA[
+<?php
+$old = file_get_contents('file_v1.txt');
+$new = file_get_contents('file_v2.txt');
+
+$diff = xdiff_string_rabdiff($old, $new);
+file_put_contents('patch.rdiff', $diff);
+?>
+]]>
+    </programlisting>
+   </example>
   </para>
  </refsect1>
 
@@ -63,13 +87,14 @@
   &reftitle.seealso;
   <para>
    <simplelist>
+    <member><function>xdiff_string_bdiff</function></member>
     <member><function>xdiff_string_bpatch</function></member>
+    <member><function>xdiff_file_bpatch</function></member>
    </simplelist>
   </para>
  </refsect1>
 
 </refentry>
-
 <!-- Keep this comment at the end of the file
 Local variables:
 mode: sgml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.