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

Tomas Votruba:
What's New in PHP 7.3 in 30 Seconds in Diffs
Aug 17, 2018 @ 16:13:30

Tomas Vortuba has put together a post sharing a summary of what's new in PHP 7.3 using a bit different tactic than just descriptions: via diffs (in about 30 seconds).

No time but eager to hear PHP news? PHP 7.3 is out in December 2018 and it brings 173 changes. Which are the most useful ones?

For each item in his list he provides code snippets showing the change for:

  • Comma After the Last Argument
  • First and Last Array Key
  • Countable for Risky Variables
  • Safer JSON Parsing

Each item on the list also links over to the related RFC for the feature that provides more detail on the change.

tagged: php73 diff difference feature comma arraykey countable json tutorial

Link: https://www.tomasvotruba.cz/blog/2018/08/16/whats-new-in-php-73-in-30-seconds-in-diffs/

SitePoint Web Blog:
Understanding Version Control with Diffs
May 23, 2014 @ 15: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.

tagged: 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
Jul 30, 2007 @ 14: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...

tagged: implement diff function unified gnu textdiff pear implement diff function unified gnu textdiff pear

Link:

Sebastian Bergmann's Blog:
Wanted: PHP Implementation of Unified Diff
Jul 30, 2007 @ 14: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...

tagged: implement diff function unified gnu textdiff pear implement diff function unified gnu textdiff pear

Link:

Sebastian Bergmann's Blog:
Visualizing Text Differences in PHPUnit 3
Aug 23, 2006 @ 15: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.

tagged: visualize text difference phpunit test diff visualize text difference phpunit test diff

Link:

Sebastian Bergmann's Blog:
Visualizing Text Differences in PHPUnit 3
Aug 23, 2006 @ 15: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.

tagged: visualize text difference phpunit test diff visualize text difference phpunit test diff

Link:


Trending Topics: