News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint Web Blog:
Understanding Version Control with Diffs
May 23, 2014 @ 10:53:30

If you're relatively new to using version control, there may be one technique you've yet to get a grip on. In this new post on SitePoint.com's Web blog they introduce you to using the "diff" functionality to discover differences between versions of code.

Every project is made up of countless little changes. With a little luck, they will finally form a website, an app, or some other product. Your version control system keeps track of these changes. But only once you understand how to read them will you be able to track your project's progress. Using the example of Git, the popular version control system, this article will help you understand these changes.

They include several screenshots and line-by-line descriptions of what each part of the output of the "git diff" command is. There's also a brief description of what each of the sections contains and how to inspect both committed and non-committed changes. There's even a link to a list of other applications that may help provide a clearer picture of the changes rather than just the command line output.

0 comments voice your opinion now!
versioncontrol diff git introduction commit branch

Link: http://www.sitepoint.com/understanding-version-control-diffs

Sebastian Bergmann's Blog:
Wanted PHP Implementation of Unified Diff
July 30, 2007 @ 09:32:00

Sebastian Bergmann has posted a "wanted" sign over on his blog - he's looking for a PHP function to do two things:

  • takes two strings as its input and
  • returns a string with the differences between the two string in the same format as GNU diff would return for diff -u for two files that contain the respective strings.

Think you can help him out? Drop him a line...

0 comments voice your opinion now!
implement diff function unified gnu textdiff pear implement diff function unified gnu textdiff pear


Sebastian Bergmann's Blog:
Visualizing Text Differences in PHPUnit 3
August 23, 2006 @ 10:36:32

Sebastian Bergmann has posted this new item on his blog today detailing how to tell the differences between two strings inside of PHPUnit 3.

A long-standing feature request for PHPUnit has been the generation of a real diff between strings that span multiple lines.

Ideally this would be done by implementing the diff algorithm in PHP. But since Derick needed a working solution quickly, the two of us came up with a "hack": we just use GNU diff and invoke the diff command via shell_exec().

He gives an example, showing how to judge the difference between two strings of HTML in a test. The result catches the differences (inside the body tags) easily.

0 comments voice your opinion now!
visualize text difference phpunit test diff visualize text difference phpunit test diff



Community Events





Don't see your event here?
Let us know!


podcast voicesoftheelephpant tool mvc symfony framework language opinion library composer series version release update introduction security interview laravel package community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework