I\'m terrible with regular expressions. I\'m trying to replace this:
public static function camelize($word) { return preg_replace(\'/(^|_)([a-z])/e\', \'s
You shouldn't use flag e (or eval in general).
e
eval
You can also use T-Regx library
pattern('(^|_)([a-z])')->replace($word)->by()->group(2)->callback('strtoupper');