Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP is_string() Function

PHP is_string() Function

PHP Available FunctionsAvailable PHP Functions

is_string() The function is used to check whether a variable is a string.

PHP version requirement: PHP 4, PHP 5, PHP 7

Syntax


bool is_string ( mixed $var )

Parameter Description:

Return Value

If the specified variable is a string, returns TRUE; otherwise returns FALSE.

Example

Example

The output is:


这是一个字符串。
bool(true)
bool(true)
bool(false)
bool(false)

PHP Available FunctionsAvailable PHP Functions