CFDump ShowUDFs Behavior

gamesover

James Moberg

Posted on April 5, 2022

CFDump ShowUDFs Behavior

I was writing some unit tests to identify the output of CFDump under different conditions and discovered that Adobe and Lucee treat the showUDFs parameter differently. I also use 3rdparty CF_Dump since it provides consistent behavior between CFML platforms. Since I've written my own internal Dumplite CFTag/CFC, I wanted to evaluate how it was already being supported before I updated how it worked.

Adobe:

  • Hides struct keys
  • Shows array elements with UDF (is this a bug?)

Lucee:

  • Displays struct value as <UDF>
  • Displays array element as <UDF>

CF_Dump

  • Displays struct key with empty value
  • Displays array element with empty value
<cfscript>
function myUDF(){return now();}

test = [
    a: [1, myUDF, 3]
    ,b: myUDF
];

writeDump(var=test, showUDFs=false, label="showUDFs=false");
writeDump(var=test, showUDFs=true, label="showUDFs=true");

</cfscript>
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
gamesover
James Moberg

Posted on April 5, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

CFDump ShowUDFs Behavior
cfml CFDump ShowUDFs Behavior

April 5, 2022