1

The idea is to have a PHP script parse a given .patch file and will apply the given patch accordingly. Assume that the script has no access to command line so the script will have to do the parsing itself. Is there a library somewhere?

radj
  • 4,360
  • 7
  • 26
  • 41

2 Answers2

3

There's the PECL xdiff library which can generate diffs from and apply them to data in regular PHP variables.

Marc B
  • 356,200
  • 43
  • 426
  • 500
1

Check out https://github.com/ptlis/diff-parser

This is a really solid lib, does exactly what it says on the tin

Danny Kopping
  • 4,862
  • 2
  • 29
  • 38