Here is a TextMate command that will convert all of the selected text from camelCase to snake_case. This command is specifically designed for PHP. Thanks to PHP not having namespaces (until recently) many developers use PEAR naming conventions resulting in code that has class names like BP_Common::fancy_function(). This command will not convert the BP_Common.
Here is the code that you can paste in to the TextMate Bundle Editor as your new command for converting cameleCase variable to snake_case.