title: Replacing e method in preg replace callback that contains arrays
body: <p>I'm not great at writing expressions. I'm trying to solve the following PHP error:
  An exception has been thrown during the rendering of a template ("Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback</p>
  
  <p>There's been other questions on here that deal with the same issue however my expression contains arrays and I need to make sure I'm writing this correctly and in an efficient way. The deprecated code was written as follows:</p>
  
  <pre><code>public static function camelize($property)
  {
      return preg_replace(array('/(^|_| )+(.)/e', '/\.(.)/e'), array("strtoupper('\\2')", "'_'.strtoupper('\\1')"), $property);
  }
  </code></pre>
  
  <p>I've replaced it with the following:</p>
  
  <pre><code>    public static function camelize($property)
  {
      return preg_replace_callback(array('/(^|_| )+(.)/', '/\.(.)/'), array(create_function ('$matches', 'return strtoupper($matches[2]);'), create_function ('$match', 'return strtoupper($match[1]);')), $property);
  }
  </code></pre>
  
  <p>Is this going to cause any errors?</p>