The Little Guy Posted July 20, 2011 Share Posted July 20, 2011 What would be a good way to do a version comparison, like how Wikipedia does it? Link to comment https://forums.phpfreaks.com/topic/242474-version-compare/ Share on other sites More sharing options...
requinix Posted July 20, 2011 Share Posted July 20, 2011 The best way would be to outsource the problem to something like Unix's diff (which undoubtedly has ports for other operating systems). Create two temporary files (if they aren't files already), run them through diff, and parse the output. If you need to do it yourself then you should get familiar with the longest common subsequence algorithm. Link to comment https://forums.phpfreaks.com/topic/242474-version-compare/#findComment-1245347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.