# Method: $isobject()
Read Time: 1 minute(s)
# Description
The $isobject() method is used to determine if a variable is an object or array.
# Syntax
var->$isobject()
1
# Arguments
None
# Return values
0 = the variable is not an object or array
1 = the variable is an object or array
1
2
2
# Examples
obj = new object
x = 42
arr = new array
bool = obj->$isobject() ;* bool = 1
crt x->$isobject() ;* Displays 0 (zero)
isobject = arr->$isobject() ;* isobject = 1
if isobject then crt \"arr" is an object of type \:dquote(arr->$objecttype())
1
2
3
4
5
6
7
2
3
4
5
6
7
# Notes
Back to Built-in Methods