Variable handling 函数
php 手册 | 脚本学堂 | 脚本编程 | 网站编程 | 系统管理 | 服务器配置 | 数据库管理 | Php教程 | python教程 | 正则表达式 | 批处理脚本 | Centos教程 | Linux基础教程

is_unicode

(PHP 6 >= 6.0.0)

is_unicodeFinds whether a variable is a unicode string

说明

bool is_unicode ( mixed $var )

Finds whether the given variable is a unicode string.

参数

var

The variable being evaluated.

返回值

Returns TRUE if var is a unicode string, FALSE otherwise.

范例

Example #1 is_unicode() example

<?php
// Declare a unicode string
$unicode 'This is a unicode string';

// Declare a binary string
$binary b'This is a binary string';

var_dump(is_unicode($unicode), is_unicode($binary));
?>

上例将输出:

bool(true)
bool(false)

参见


Variable handling 函数
php 手册 | 脚本学堂 | 脚本编程 | 网站编程 | 系统管理 | 服务器配置 | 数据库管理 | Php教程 | python教程 | 正则表达式 | 批处理脚本 | Centos教程 | Linux基础教程