|
|
| Pathologically Eclectic Rubbish Lister | |
| PerlMonks |
Re^5: Logical/defined or as lvalueby ikegami (Patriarch) |
| on Sep 04, 2024 at 17:00 UTC ( [id://11161588]=note: print w/replies, xml ) | Need Help?? |
|
That makes PHP's Elvis operator a value-preserving logical-OR operator, like Perl's ||. According to the article, || also has this function in Common Lisp, Clojure, Lua, Object Pascal, Python, Ruby, and JavaScript. It's rather disingenuous to call the article "Elvis operator". In C, || is normalizes the value to 0 or 1.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||