« first day (2836 days earlier)      last day (2097 days later) » 

1:59 PM
Simple php question... I have a conditional like this: echo $result = $a or $b;. It works fine. But if I use || instead of or, it echoes 1. What is happening here?
 
 
4 hours later…
5:53 PM
@JackJohansson I wouldn't include both an echo and an = in the same statement
too many things on 1 line
I'm assuming it's 1 because of the assignment
 
 
1 hour later…
7:11 PM
@TomJNowell It was actually a return statement that would either return a value or die()
 
too many things on 1 line
try to follow the 1 statement per line rule
and wrap boolean logic in () so it's clearer
 
Familiarizing myself with more complex lines, seeing everyday
Amazon devs take it so hard that I can barely understand their 1 line code
Not to mention putting a page of code after a single return statement
 

« first day (2836 days earlier)      last day (2097 days later) »