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-bdiff.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-bdiff.php',
   
1 => 'xdiff_string_bdiff',
  ),
 
'up' =>
  array (
   
0 => 'ref.xdiff.php',
   
1 => 'xdiff Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.xdiff-string-bdiff-size.php',
   
1 => 'xdiff_string_bdiff_size',
  ),
 
'next' =>
  array (
   
0 => 'function.xdiff-string-bpatch.php',
   
1 => 'xdiff_string_bpatch',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.xdiff-string-bdiff" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xdiff_string_bdiff</h1>
  <p class="verinfo">(PECL xdiff &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">xdiff_string_bdiff</span> &mdash; <span class="dc-title">Make binary diff of two strings</span></p>

 </div>
 
 <a name="function.xdiff-string-bdiff.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><b>xdiff_string_bdiff</b></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.
   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>
 </div>


 <a name="function.xdiff-string-bdiff.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-bdiff.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-bdiff.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