2

I need to parse diff files (as created by Git).

I've already tried Text_Diff from PEAR and "PHP class for parsing diffs" solution. However, both can only generate diffs themselves.

Does anyone know ready-made solution?

p.s.: writing simple diff-viewer script.

3
  • 2
    What's your question? We're not going to write your entire script for you!!! Commented Jan 16, 2012 at 15:22
  • Sry. Maybe someone knows r-t-w solution? Commented Jan 16, 2012 at 15:24
  • @psynnott: in fairness, he was not asking for someone to write his script, but rather if something is out there already. Commented Jan 16, 2012 at 15:28

1 Answer 1

0

There's the xdiff PHP extension. Failing that, you can always exec() the actual diff commandline tools from within your script.

Sign up to request clarification or add additional context in comments.

3 Comments

I can't find any info about parsing diff files. de2.php.net/manual/en/book.xdiff.php.
xdiff is documented on php.net, as is using exec. The diff commandline tools are also well documented.
That's great, but i still can't see any solution for parsing diff files.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.