views:

39

answers:

2

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?

A: 

What are you patching?

Belongs in a comment.
Chacha102
Don't have 50 rep yet...
Would you people please stop down-voting this?! I would have put it in a comment if I had enough rep points, and you're only making that worse...
I'm patching text files, specifically, PHP files.
radj
+1  A: 

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

Marc B
Great! Thanks for this! Gives me a nice lead.
radj