cv-pls php I previously answered this question half a decade ago, but now that I re-read the question, it doesn't contain a MCVE and is unclear about the exact desired result. Not a good fit for SO; even if a dupe was found/assumed, it wouldn't be a good signpost for that dupe target.
stackoverflow.com/q/38222487/2943403