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

The above example will output:

bool(true)
bool(false)

See Also

  • is_binary() - Finds whether a variable is a native binary string
  • is_buffer() - Finds whether a variable is a native unicode or binary string
  • is_string() - Find whether the type of a variable is string
  • unicode_encode() - Convert a unicode string in any encoding



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