Can someone please help to clarify? Also, please mention if there are other representation of “$|”.
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no practical difference that I know of;
$|only stores a boolean (0 or 1), so incrementing it will never result in any value other than 1. The micro-micro-optimizers might tell you that ++ is faster.Decrementing it, on the other hand, acts as a toggle, but I can’t think of any good reason to do that in production code: either you want it on or off.