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

search for in the

is_bool> <is_array
Last updated: Thu, 17 Sep 2009

view this page in

is_binary

(PHP 6 >= 6.0.0)

is_binaryFinds whether a variable is a native binary string

Descripción

bool is_binary ( mixed $var )

Finds whether the given variable is a native binary string.

Lista de parámetros

var

The variable being evaluated.

Valores retornados

Returns TRUE if var is a native binary string, FALSE otherwise.

Ejemplos

Example #1 is_binary() example

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

// Declare a binary string using the 'b' prefix
// available as of PHP 5.2.1, but it will only have 
// effect as of PHP 6.0.0
$binary b'This is a binary string';

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

El resultado del ejemplo seria:

bool(false)
bool(true)

Ver también

  • is_buffer() - Finds whether a variable is a native unicode or binary string
  • is_string() - Encuentra si el tipo de una variable es cadena
  • is_unicode() - Finds whether a variable is a unicode string



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

is_bool> <is_array
Last updated: Thu, 17 Sep 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites