is_bool
is_callable
Variable handling 함수 목록
PHP Manual

# is_buffer

(PHP 6 >= 6.0.0)

is_buffer — Finds whether a variable is a native unicode or binary string

### 설명

bool is_buffer ( mixed `$var` )

Finds whether the given variable is a native unicode or binary string.

### 인수

`var`

  The variable being evaluated.

### 반환값

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

### 예제

Example #1 is_buffer() example

`<?php
// Declare some variables with different types
$types = array(
'unicode' => 'Unicode string',
'binary' => b'Binary string',
'resource' => fopen('php://stdin', 'r'),
'integer' => 42
);
// Test which types thats a buffer
foreach($types as $type => $value)
{
if(is_buffer($value))
{
echo $type . ' is a either a unicode or binary string';
}
else
{
echo $type . ' is not a buffer value';
}
echo PHP_EOL;
}
?>`

위 예제의 출력:

    unicode is a either a unicode or binary string
    binary is a either a unicode or binary string
    resource is not a buffer value
    integer is not a buffer value

### 참고

- is_binary() - Finds whether a variable is a native binary string
- is_string() - 변수의 자료형이 문자열인지 확인합니다
- is_unicode() - Finds whether a variable is a unicode string

is_bool
is_callable
Variable handling 함수 목록
PHP Manual