Re: [PHP] Renaming all variables in a repository

2009-07-23 Thread Stuart
2009/7/23 Eddie Drapkin : > Hey all, > we've got a repository here at work, with something like 55,000 files > in it. For the last few years, we've been naming $variables_like_this > and functions_the_same($way_too).  And now we've decided to switch to > camelCasing everything and I've been tasked

RE: [PHP] Renaming all variables in a repository

2009-07-23 Thread Yuri Yarlei
. > Date: Thu, 23 Jul 2009 12:56:51 -0400 > From: oorza...@gmail.com > To: php-general@lists.php.net > Subject: [PHP] Renaming all variables in a repository > > Hey all, > we've got a repository here at work, with something like 55,000 files > in it. For the last

Re: [PHP] Renaming all variables in a repository

2009-07-23 Thread Martin Scotta
function toCamelCase( $string ) { return str_replace( ' ' , '', ucwords( strtolower( strtr($string, '_', ' ') ) )); } echo toCamelCase( 'this_is_not_properly_written' ); You can use this simplest function to translate a string to camelCase. The process could be... 1) parse by PHP 2) transl

Re: [PHP] Renaming all variables in a repository

2009-07-23 Thread Robert Cummings
Eddie Drapkin wrote: Hey all, we've got a repository here at work, with something like 55,000 files in it. For the last few years, we've been naming $variables_like_this and functions_the_same($way_too). And now we've decided to switch to camelCasing everything and I've been tasked with someho

[PHP] Renaming all variables in a repository

2009-07-23 Thread Eddie Drapkin
Hey all, we've got a repository here at work, with something like 55,000 files in it. For the last few years, we've been naming $variables_like_this and functions_the_same($way_too). And now we've decided to switch to camelCasing everything and I've been tasked with somehow determining if it's pos