In fact, we need some version control system functionality.

Work is conducted with text data (from 1000 characters to several MB of text), several users can edit one text. Each time a change is saved, it is necessary to compare the new text with the previous version of the text and mark what has been deleted, what has been added (comparison is enough for whole words).

Tell me which way to dig, maybe there are ready-made solutions that you can embed in a site in PHP?


Upd: I found this solution . I will build my service on it.

    1 answer 1

    google-diff-match-patch

    and this is the port on php: https://github.com/yetanotherape/diff-match-patch

    • And one more option . Only JS - Deonis
    • @Deonis functionality is minimal. - lampa
    • one
      Thanks lampa, very similar to what you need. I will go to understand and test. - Anton Smurov