How to break up long words - PHP

If i have a variable:

$smth = “this is very extramegasupermammothgigantdifficult”;

Now in PHP i’m trying to write a code that searches that variable and inserts a whitespace into a word that is longer than eg. 25 characters… i know i should probably use [COLOR=#800080]ereg_replace()[/COLOR]

any ideas ?