Skip to content

Commit

Permalink
[DependencyInjection] Regex optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek authored and fabpot committed Oct 21, 2010
1 parent c41afd2 commit 77c4529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Container.php
Expand Up @@ -282,7 +282,7 @@ public function __call($method, $arguments)

static public function camelize($id)
{
return preg_replace(array('/(^|_)+(.)/e', '/\.(.)/e'), array("strtoupper('\\2')", "'_'.strtoupper('\\1')"), $id);
return preg_replace(array('/(?:^|_)+(.)/e', '/\.(.)/e'), array("strtoupper('\\1')", "'_'.strtoupper('\\1')"), $id);
}

static public function underscore($id)
Expand Down

0 comments on commit 77c4529

Please sign in to comment.