×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
1
Language: Bash
Posted by: Dmitriy Lanets
Added: Jan 17, 2019 12:23 PM
Views: 3667
Tags: php
  1. $welcome = file_get_contents('/content/welcome');
  2. $text = preg_replace_callback('/[\w-]{6,}/ui',
  3.     function ($matches) {
  4.         return mb_substr($matches[0], 0, 5)."#";
  5.     },
  6. $welcome);
  7.  
  8. echo $text;