From 77c4529f15bbc28717deb7a6d0421a8578f8e8ea Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 20 Oct 2010 20:33:59 +0200 Subject: [PATCH] [DependencyInjection] Regex optimization --- Container.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Container.php b/Container.php index 5ca215387..58a33b99f 100644 --- a/Container.php +++ b/Container.php @@ -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)