驼峰字符串转换成下划线样式
// 驼峰字符串转换成下划线样式
$str = 'openAPI';
echo $str."<BR>";
echo strtolower(preg_replace('/((?<=[a-z])(?=[A-Z]))/', '_', $str)).'<br>';
以上就是驼峰字符串转换成下划线样式的内容,更多相关内容请关注PHP中文网(www.php.cn)!
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn