Reputation: 1
I can not fix this error:
$match[1] = preg_replace('/(?<=^|[a-z])./e', 'strtoupper("\0")', strtolower(trim($match[1])));
How to change it?
Upvotes: 0
Views: 331
Reputation: 15629
You should read the manual. The e
modifier is deprecated and will be removed in further versions.
Just use preg_replace_callback
(the message told you..)
$match[1] = preg_replace_callback('/(?<=^|[a-z])./', function($m) {
return strtoupper($m[0]);
}, strtolower(trim($match[1])));
Upvotes: 5