Menu Riverview Church

GETTYPE

Get the type of a variable

SYNTAX

gettype ( mixed $var ) : string

PARAMETERS

var

The variable being type checked.

RETURN

Possible values for the returned string are:

"boolean"

"integer"

"double" (for historical reasons "double" is returned in case of a float, and not simply "float")

"string"

"array"

"object"

"resource"

"resource (closed)"

"NULL"

EXAMPLES

1

integer

2

boolean
integer
double
string
array
object
NULL

3

resource

4

resource (closed)

PHP