What is the best way to do this for PHP? Is there any PHP function that can do this, considering the column content could be very large?
If PHP function is not available, what shell utility can I call?
thanks
What is the best way to do this for PHP? Is there any PHP function that can do this, considering the column content could be very large?
If PHP function is not available, what shell utility can I call?
thanks
The usual process is to store each distinct revision and calculate the diff when the user wants to view it, perhaps caching that output if the process is expensive.
You could store a base revision, and then have a set of diffs which can be applied to obtain previous versions.
In either case, there's a concession to be made; the first option makes retrieving specific versions inexpensive, at the cost of a little more processing required for diffing; the second makes diff viewing cheap, but at the cost of potentially expensive incremental patching to obtain a specific version.