>Because isDefined() can end up searching CGI scope, you can get
>situations where an isDefined() call will initiate a callback from
>ColdFusion to the web server through the web connector. Only a subset
>of 'standard' CGI variables are passed directly to CF. Any subsequent
>references to CGI.somevar cause a callback via the web connector to
>see if the web server actually knows about somevar. It should be clear
>that isDefined() can initiate such a reference...
>

Hmm...

So what would happen in the following in code?

<cfoutput>#structKeyExists(remote_host,'blah')#</cfoutput>

Presumably ColdFusion will figure out that the variable exists in the CGI
scope, but what will it do then?

Does it need to go off to the web connector, or does it already know that
the CGI scope can't contain a struct?

And what about this code?

<cfoutput>#structKeyExists(foo,'bar')#</cfoutput>

If foo doesn't exist in the variables scope, structKeyExists() definitely
looks in the form scope, and presumably the other implicit scopes.

What is the performance benefit of using structKeyExists() in that scenario?

I'm genuinely curious about this, not just splitting hairs.

Spike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to