Variable handling Functions
PHP Manual

is_unicode

(No version information available, might be only in CVS)

is_unicodeFinds whether a variable is a unicode string

Description

bool is_unicode ( mixed $var )

Finds whether the given variable is a unicode string.

Parameters

var

The variable being evaluated.

Return Values

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

Examples

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_bunicode($binary));
?>

The above example will output:

bool(true)
bool(false)

See Also


Variable handling Functions
PHP Manual