Variable handling Funkcje
PHP Manual

is_unicode

(PHP 6 >= 6.0.0)

is_unicodeFinds whether a variable is a unicode string

Opis

bool is_unicode ( mixed $var )

Finds whether the given variable is a unicode string.

Parametry

var

The variable being evaluated.

Zwracane wartości

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

Przykłady

Przykład #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));
?>

Powyższy przykład wyświetli:

bool(true)
bool(false)

Zobacz też:


Variable handling Funkcje
PHP Manual