empty

Checks if a variable is empty

empty(variable) → returns boolean

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Argument Reference

variable any
Required

Values:
  • ""
  • {}
  • []

Compatibility

Lucee:

DEPRECATED since version 4.5 Use IsEmpty() instead.

Examples
Sample code invoking the empty function

Check whether the variable is empty or not

<cfoutput>
	<cfset Language = "Coldfusion">
	#empty(Language)#
	<cfset MyInput = "">
	#empty(MyInput)#
</cfoutput>

Expected Result: false,true

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub