php man page for is_string

Query: is_string

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

IS_STRING(3)								 1							      IS_STRING(3)

is_string - Find whether the type of a variable is string

SYNOPSIS
bool is_string (mixed $var)
DESCRIPTION
Finds whether the type given variable is string.
PARAMETERS
o $var - The variable being evaluated.
RETURN VALUES
Returns TRUE if $var is of type string, FALSE otherwise.
EXAMPLES
Example #1 is_string(3) example <?php $values = array(false, true, null, 'abc', '23', 23, '23.5', 23.5, '', ' ', '0', 0); foreach ($values as $value) { echo "is_string("; var_export($value); echo ") = "; echo var_dump(is_string($value)); } ?> The above example will output: is_string(false) = bool(false) is_string(true) = bool(false) is_string(NULL) = bool(false) is_string('abc') = bool(true) is_string('23') = bool(true) is_string(23) = bool(false) is_string('23.5') = bool(true) is_string(23.5) = bool(false) is_string('') = bool(true) is_string(' ') = bool(true) is_string('0') = bool(true) is_string(0) = bool(false)
SEE ALSO
is_float(3), is_int(3), is_bool(3), is_object(3), is_array(3). PHP Documentation Group IS_STRING(3)
Related Man Pages
is_object(3) - php
isset(3) - php
is_scalar(3) - php
empty(3) - php
parsekit_func_arginfo(3) - php
Similar Topics in the Unix Linux Community
Replacing in SED
affect variable
If Condition
Simplest way to format with If on stout?
Output checker setting variable to TRUE or FALSE