Ver original<?php$str = 'foo bar candy';$n = array_sum(array_map('strlen',str_word_count($str, 1)));echo $n;