title: Same php preg_replace() behave differently in terminal and apache
body: <p>This function remove non alphanumeric characters from a given string. This function works great in apache and Ubuntu terminal if i send  standard English strings to process. But if i send a string like "VÈLOCATION" its only works in apache.</p>
  
  <pre><code>&lt;?php
  function custome_repalce($newname) {
      $newname = preg_replace('~[^\p{L}\p{N}]++~u', '', $newname);
      return $newname;
  }
  
  echo custome_repalce("VÈLOCATION");
  </code></pre>
  
  <p>in browser this shows</p>
  
  <blockquote>
    <p>VÈLOCATION</p>
  </blockquote>
  
  <p>but when i run his on ubuntu terminal i get a empty string</p>