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

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)

RE: [PHP] Renaming all variables in a repository

2009-07-23 Thread Yuri Yarlei
In a project with this large number of files, is better if you let the way it is, doing this now you can crash the project and lost much much time. Yuri Yarlei. Programmer PHP, CSS, Java, PostregreSQL; Today PHP, tomorrow Java, after the world. Kyou wa PHP, ashita wa Java, sono ato sekai desu.

Re: [PHP] Renaming all variables in a repository

2009-07-23 Thread Stuart
2009/7/23 Eddie Drapkin oorza...@gmail.com: 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