title: PHP preg_replace alternative
body: <p>We're currently getting a preg_replace error message on our site due to deprecation.</p>
  
  <p>Our code is as follows:</p>
  
  <pre><code>$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $data);
  </code></pre>
  
  <p>Any suggestions on how this can be replaced with non-deprecated code?</p>