title: PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
body: <p>Error: Depreciated</p>
  
  <pre><code> if( preg_match('/([^:]+): (.+)/m', $field, $match) ) {
              $match[1] = preg_replace_callback('/(?&lt;=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(trim($match[1])));
  </code></pre>
  
  <p>How to use preg_replace_callback instead of preg_replace ? I tried to replace the preg_replace and got another error. </p>
  
  <blockquote>
    <p>PHP Warning:  preg_replace_callback(): Requires argument 2, 'strtoupper(&quot;\0&quot;)', to be a valid callback in</p>
  </blockquote>