WordPress开发者和主题制作者的搜索引擎



backslashit ›

Since0.71
已弃用n/a
backslashit ( $string )
参数:
  • (string) $string Value to which backslashes will be added.
    Required: Yes
返回:
  • (string) String with backslashes inserted.
定义在:
文档:

Adds backslashes before letters and before a number at the start of a string.



源码

function backslashit( $string ) {
	if ( isset( $string[0] ) && $string[0] >= '0' && $string[0] <= '9' ) {
		$string = '\\\\' . $string;
	}
	return addcslashes( $string, 'A..Za..z' );
}