empty

Checks if a variable is empty

empty(variable) → returns boolean

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

empty 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


Fork me on GitHub