开发者

Is it possible to parse and apply patch files in PHP?

开发者 https://www.devze.com 2023-01-03 02:12 出处:网络
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 it

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?


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


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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号