Elvis operator

noun

A binary operator that returns its first operand if that operand evaluates to true, and otherwise evaluates and returns its second operand.

Meanings

nounElvis operator (plural Elvis operators)

plural Elvis operators

  1. informalcomputingA binary operator that returns its first operand if that operand evaluates to true, and otherwise evaluates and returns its second operand.

Origin

The notation ?: humorously reinterpreted as an emoticon representing the eyes and hairstyle of Elvis Presley.

Full word history & related roots →
Cite this entry
APA

Elvis operator. (n.d.). In WatkinsX Dictionary. Retrieved November 3, 2026, from https://dictionary.watkinsx.com/word/Elvis%20operator

MLA

“Elvis operator.” WatkinsX Dictionary, https://dictionary.watkinsx.com/word/Elvis%20operator. Accessed November 3, 2026.

Chicago

WatkinsX Dictionary, s.v. “Elvis operator,” accessed November 3, 2026, https://dictionary.watkinsx.com/word/Elvis%20operator.

Source: Elvis operator on Wiktionary, CC BY-SA 4.0.