CamelCase to snake_case

$snake_case = strtolower(preg_replace('/([a-z0-9])([A-Z])/', '$1_$2', $CamelCase));

ってのをした;