<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Mon, 20 May 2013 08:35:18 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Wanted: PHP Implementation of Unified Diff]]></title>
      <guid>http://www.phpdeveloper.org/news/8348</guid>
      <link>http://www.phpdeveloper.org/news/8348</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> has <a href="http://sebastian-bergmann.de/archives/687-Wanted-PHP-Implementation-of-Unified-Diff.html">posted a "wanted" sign</a> over on his blog - he's looking for a PHP function to do two things:
</p>
<ul>
<li>takes two strings as its input and
<li>returns a string with the differences between the two string in the same format as <a href="http://www.gnu.org/software/diffutils/">GNU diff</a> would return for diff -u for two files that contain the respective strings.
</ul>
<p>
Think you can help him out? <a href="http://sebastian-bergmann.de/archives/687-Wanted-PHP-Implementation-of-Unified-Diff.html">Drop him a line</a>...
</p>
]]></description>
      <pubDate>Mon, 30 Jul 2007 09:32:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Visualizing Text Differences in PHPUnit 3]]></title>
      <guid>http://www.phpdeveloper.org/news/6119</guid>
      <link>http://www.phpdeveloper.org/news/6119</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> has posted <a href="http://www.sebastian-bergmann.de/blog/archives/618-Visualizing-Text-Differences-in-PHPUnit-3.html">this new item</a> on his blog today detailing how to tell the differences between two strings inside of <a href="http://www.phpunit.de/">PHPUnit 3</a>.
</p>
<blockquote>
A long-standing feature request for <a href="http://www.phpunit.de/">PHPUnit</a> has been the generation of a real <a href="http://en.wikipedia.org/wiki/Diff">diff</a> between strings that span multiple lines.
</p>
<p>
Ideally this would be done by implementing the diff algorithm in <a href="http://www.php.net/">PHP</a>. But since <a href="http://derickrethans.nl/">Derick</a> needed a working solution quickly, the two of us came up with a "hack": we just use <a href="http://www.gnu.org/software/diffutils/">GNU diff</a> and invoke the diff command via <a href="http://www.php.net/shell_exec">shell_exec()</a>.
</blockquote>
<p>
He <a href="http://www.sebastian-bergmann.de/blog/archives/618-Visualizing-Text-Differences-in-PHPUnit-3.html">gives an example</a>, showing how to judge the difference between two strings of HTML in a test. The result catches the differences (inside the body tags) easily.
</p>]]></description>
      <pubDate>Wed, 23 Aug 2006 10:36:32 -0500</pubDate>
    </item>
  </channel>
</rss>
