is_string(3) php man page | unix.com

Man Page: is_string

Operating Environment: php

Section: 3

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_numeric(3) - php
gettype(3) - php
is_int(3) - php
is_scalar(3) - php
data::types(3pm) - debian
Similar Topics in the Unix Linux Community
what is that?
How to overcome Segmentation Fault in Unix ??
If Condition
Simplest way to format with If on stout?
If echo statement return false