Created
January 26, 2026 10:56
-
-
Save trycf/6135fb3c7488a677b2a77973b3591716 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfset foo = val(3)> | |
| <cfset bar=""> | |
| <cfset quuz=""> | |
| <cfif bar eq "" and quuz neq ""> | |
| <cfset bar = quuz> | |
| <cfelseif bar eq ""> | |
| <cfset bar = 0> | |
| </cfif> | |
| <cfdump label="old" var="#bar#"> | |
| <cfset bar = ( | |
| (!len(bar) and val(quuz)) | |
| ? | |
| (!len(bar) : quuz | |
| : 0 | |
| ) > | |
| <cfdump label="new" var="#bar#" abort> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment