convert preg_replace to preg_replace_callback modifier error
<p>i have this code:</p>

<pre><code>$key = preg_replace(
            '/(^|[a-z])([A-Z])/e', 
            'strtolower(strlen("\\1") ? "\\1_\\2" : "\\2")',
            substr($method, 3) 
          );
</code></pre>

<p>I receive php warning ( php 5.6 ), and i try to convert it with preg_replace_callback:</p>

<pre><code>$key = preg_replace_callback(
            '/(^|[a-z])([A-Z])/e',
            function($m) { 
                return strtolower(strlen("\\{$m[1]}") ? "\\{$m[1]}_{$m[2]}" : "\\{$m[2]}"); 
            },
            substr($method, 3)
        );
</code></pre>

<p>but i receive this error:</p>

<pre><code>Modifier /e cannot be used with replacement callback 
</code></pre>

<p>Can someone help me to convert it right?</p>

<p>Thanks</p>