downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.xdiff-string-rabdiff.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.xdiff.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.xdiff-string-rabdiff.php',
   
1 => 'xdiff_string_rabdiff',
  ),
 
'up' =>
  array (
   
0 => 'ref.xdiff.php',
   
1 => 'xdiff Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.xdiff-string-patch.php',
   
1 => 'xdiff_string_patch',
  ),
 
'next' =>
  array (
   
0 => 'refs.international.php',
   
1 => 'Human Language and Character Encoding Support',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.xdiff-string-rabdiff" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xdiff_string_rabdiff</h1>
  <p class="verinfo">(PECL xdiff &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">xdiff_string_rabdiff</span> &mdash; <span class="dc-title">Make binary diff of two strings using the Rabin&#039;s polynomial fingerprinting algorithm</span></p>

 </div>
 
 <a name="function.xdiff-string-rabdiff.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><a href="function.xdiff-string-bdiff.php" class="function">xdiff_string_bdiff</a></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$old_data</tt></span>
   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$new_data</tt></span>
   )</div>

  <p class="para rdfs-comment">
   Makes a binary diff of two strings and returns the result.
   The difference between this function and <a href="function.xdiff-string-bdiff.php" class="function">xdiff_string_bdiff()</a> 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 <a href="function.xdiff-string-bpatch.php" class="function">xdiff_string_bpatch()</a>/<a href="function.xdiff-file-bpatch.php" class="function">xdiff_file_bpatch()</a>.
  </p>
  <p class="para">
   For more details about differences between algorithm used please check <a href="http://www.xmailserver.org/xdiff-lib.html" class="link external">&raquo; libxdiff</a>
   website.
  </p>
 </div>


 <a name="function.xdiff-string-rabdiff.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">old_data</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       First string with binary data. It acts as &quot;old&quot; data.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">new_data</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Second string with binary data. It acts as &quot;new&quot; data.
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.xdiff-string-rabdiff.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns string with binary diff containing differences between &quot;old&quot; and &quot;new&quot;
   data or <b><tt class="constant">FALSE</tt></b> if an internal error occurred.
  </p>
 </div>


 <a name="function.xdiff-string-rabdiff.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.xdiff-string-bpatch.php" class="function" rel="rdfs-seeAlso">xdiff_string_bpatch()</a> - Patch a string with a binary diff</li>
   </ul><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites