Echo89

Remove Stuff...

Feb 21st, 2014
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $input = "Let the message of Christ dwell among you richly as you teach and admonish one another with all wisdom through psalms, hymns, and songs from the Spirit, singing to God with gratitude in your hearts.
  4. Colossians 3:16";
  5.  
  6. function FirstLetterSpacingAndPunctuationAlsoDidYouNoticeThisFunctionHasALongNameQuestionMark($input) {
  7.     $input = preg_replace_callback("/[A-Z]+/i", function($matches) {
  8.         return substr_replace($matches[0], '', 1);
  9.     }, $input);
  10.    
  11.     $input = str_replace(range(0, 9), '', $input);
  12.    
  13.     return $input;
  14. }
  15.  
  16. echo FirstLetterSpacingAndPunctuationAlsoDidYouNoticeThisFunctionHasALongNameQuestionMark($input);
  17.  
  18. ?>
RAW Paste Data