Hitung kata dalam string php

#Text must be in double-qoutes in brackets

echo str_word_count("Text goes here...");
Rick Astley