If the string is too long, you can first use substr to truncate the string and then a regular expression to remove the last full or partial word:
$s = substr($s, 0, (140 - 3));
$s = preg_replace('/ [^ ]*$/', ' ...', $s);
Note that you have to make the original shorter than 140 bytes because when you add the ... this could increase the length of the string beyond 140 bytes.