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 stringSYNOPSISbool is_string (mixed $var)DESCRIPTIONFinds whether the type given variable is string.PARAMETERSo $var - The variable being evaluated.RETURN VALUESReturns TRUE if $var is of type string, FALSE otherwise.EXAMPLESExample #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 ALSOis_float(3), is_int(3), is_bool(3), is_object(3), is_array(3). PHP Documentation Group IS_STRING(3)
Related Man Pages |
---|
ctype_digit(3) - php |
is_object(3) - php |
is_scalar(3) - php |
class_alias(3) - php |
data::types(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
How to count number of occurrences of a "|" from a variable? |
Grep -c |
Simplest way to format with If on stout? |
awk with variable |
Output checker setting variable to TRUE or FALSE |