| Viewed 65 times

How I should compare two words by ASCII Codes in PHP?


I need to compare two words based on the sum of their ASCII codes and returns the word with the smaller ASCII sum. Examples asciiSort(["majorly", "then"]) // "then"

PHP