<?php $str = ' But I must explain to you how all this mistaken';echo preg_replace('/(?= )\s+|(\w).*/u', '$1', $str);
Standard input is empty
B
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!