is_array
is_bool
Variable handling Functions
PHP Manual

# is_binary

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

is_binary — Finds whether a variable is a native binary string

### Description

bool is_binary ( mixed `$var` )

Finds whether the given variable is a native binary string.

### Parameters

`var`

  The variable being evaluated.

### Return Values

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

### Examples

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));
?>`

The above example will output:

    bool(false)
    bool(true)

### See Also

- is_buffer()
- is_string()
- is_unicode()

is_array
is_bool
Variable handling Functions
PHP Manual