downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

isset> <is_string
Last updated: Fri, 06 Nov 2009

view this page in

is_unicode

(PHP 6 >= 6.0.0)

is_unicode変数が unicode 文字列かどうかを調べる

説明

bool is_unicode ( mixed $var )

指定した変数が、unicode 文字列かどうかを調べます。

パラメータ

var

調べる変数。

返り値

varunicode 文字列である場合に TRUE、それ以外の場合に FALSE を返します。

例1 is_unicode() の例

<?php
// unicode 文字列を宣言します
$unicode 'This is a unicode string';

// バイナリ文字列を宣言します
$binary b'This is a binary string';

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

上の例の出力は以下となります。

bool(true)
bool(false)

参考

  • is_binary() - 変数がネイティブバイナリ文字列かどうかを調べる
  • is_buffer() - 変数がネイティブ unicode あるいはバイナリ文字列かどうかを調べる
  • is_string() - 変数の型が文字列かどうかを調べる
  • unicode_encode() - unicode 文字列を任意のエンコーディングに変換する



add a note add a note User Contributed Notes
is_unicode
There are no user contributed notes for this page.

isset> <is_string
Last updated: Fri, 06 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites