This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Transforms an under_scored_string to a camelCasedOne | |
*/ | |
function camelize($scored) { | |
return preg_replace('/[-_]([a-z])/e', 'strtoupper("$1")', $scored); | |
} | |
/** | |
* Transforms a camelCasedString to an under_scored_one |