JS and PHP won't get you anywhere - you will need to use something else like R or python to start looking at it.
Check out this course: https://www.datacamp.com/courses/intro-to-text-mining-bag-of...
This will help you figure out how to convert those words into variables which can be used for modeling.