PHP Implementation of Longest common subsequence algorithm that works with UTF-8 input.
Via Composer
$ composer require gordonlesti/longest-common-subsequence
use GordonLesti\LongestCommonSubsequence\LongestCommonSubsequence;
Calculates the longest common subsequence of both strings and returns the length.
$lcsDist = LongestCommonSubsequence::lcs("DABDC", "CBDBBAC");
Please see CHANGELOG for more information on what has changed recently.
$ composer test
If you discover any security related issues, please email info@gordonlesti.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.