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-merge3.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-merge3.php',
   
1 => 'xdiff_string_merge3',
  ),
 
'up' =>
  array (
   
0 => 'ref.xdiff.php',
   
1 => 'xdiff Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.xdiff-string-diff.php',
   
1 => 'xdiff_string_diff',
  ),
 
'next' =>
  array (
   
0 => 'function.xdiff-string-patch-binary.php',
   
1 => 'xdiff_string_patch_binary',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.xdiff-string-merge3" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xdiff_string_merge3</h1>
  <p class="verinfo">(PECL xdiff &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">xdiff_string_merge3</span> &mdash; <span class="dc-title">Merge 3 strings into one</span></p>

 </div>
 
 <a name="function.xdiff-string-merge3.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b>xdiff_string_merge3</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_data1</tt></span>
   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$new_data2</tt></span>
   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter reference">&amp;$error</tt></span>
  ] )</div>

  <p class="para rdfs-comment">
   Merges three strings into one and returns the result.
   The <i><tt class="parameter">old_data</tt></i>
 is an original version of data
   while <i><tt class="parameter">new_file1</tt></i>
 and <i><tt class="parameter">new_file2</tt></i>
 are modified
   versions of an original. An optional <i><tt class="parameter">error</tt></i>
 is used to pass any
   rejected parts during merging process.
  </p>
 </div>


 <a name="function.xdiff-string-merge3.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 data. It acts as &quot;old&quot; data.
      </p>
     </dd>

   
    <dt class="varlistentry">

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

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

      <p class="para">
       Second string with data. It acts as modified version of <i><tt class="parameter">old_data</tt></i>
.
      </p>
     </dd>

   
    <dt class="varlistentry">

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

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

      <p class="para">
       Third string with data. It acts as modified version of <i><tt class="parameter">old_data</tt></i>
.
      </p>
     </dd>

   
    <dt class="varlistentry">

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

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

      <p class="para">
       If provided then rejected parts are stored inside this variable.
      </p>
     </dd>

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


 <a name="function.xdiff-string-merge3.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the merged string, <b><tt class="constant">FALSE</tt></b> if an internal error happened, or <b><tt class="constant">TRUE</tt></b>
   if merged string is empty.
  </p>
 </div>


 <a name="function.xdiff-string-merge3.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-file-merge3.php" class="function" rel="rdfs-seeAlso">xdiff_file_merge3()</a> - Merge 3 files into one</li>
   </ul><p>
  </p>
 </div>


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