almost 7 years ago

## PHP: Text trimming, value dumping and MIME encoding

While working on various web projects written completely in PHP, I collected
some custom procedures for more satisfying work.

### Text trimming

Often you are in need of trimming some text by set number of characters, but
do not want to trim mid-word. This is a function which cuts text between words
trying to reduce string length to be less than provided value.

### Pretty-printing values of variables

So, you are a web developer. Why are you have to use such stdout-oriented
functions as echo or print? We will dump variables of any complexity using
HTML format.