Blog Post RSS ?

Blogs » ColdFusion » IsDefined() vs. structKeyExists()
 

IsDefined() vs. structKeyExists()

by Eric Jones

Sean Corfield recently blogged about the choice to use IsDefined vs. structKeyExists when trying to determine if a scoped variable (session, application, request, form url etc), exists or not.

Sean talks about how certain dot noted variables will or won’t be seen with IsDefined, BUT I found the fact that IsDefined looks for ANY possible definition even when the variable you’re searching for has been scoped.

Read his blurb to get the full effect.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

No related posts.

This post has 2 responses so far

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow SitePoint on...