Amine
Amine

Reputation: 27

I wonder for the meaning of this instruction

Can you explain to me the meaning of the following instruction :

? echo 2<=>1;

Indeed i do not understand how to interpret ? in the beginning.

Thank you

Upvotes: 0

Views: 44

Answers (1)

Ryan
Ryan

Reputation: 11

This might be symbolizing a ternary logic statement. The '?' comes after the conditional statement followed by the "if" and "then" portion. In your case, (condition) ? 2<=>1; The '<=>' is known as a Spaceship Operator Documentation here. 2<=>1 evaluates to 1 since 2 is greater than one and it's on the left side. So your statement here will echo (or print to the console) "1" if the condition is true. Hoped this helped!!!

Upvotes: 1

Related Questions