Determines whether an object is an instance of a ColdFusion interface or component, or of a Java class.

isInstanceOf(object, typename) → returns boolean

Argument Reference

object any

The CFC instance or Java object that you are testing

typename string

The name of the interface, component, or Java class of which the object might be an instance

Sample code invoking the isInstanceOf function

Dates in CFML are instances of the java class: java.util.Date

isInstanceOf(now(), "java.util.Date")

Expected Result: true

Fork me on GitHub