I was reading a PHP book about operators.
And the book says that if(!$a == $b) is faster then if($a != $b).
Is this true?
I have tried this with MS but with no results. What do you think?
EDIT:
if($a != $b) is faster then if(!$a == $b)
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.
Over 1,000,000 iterations, I found that
if( $a != $b)is about 40% slower thanif( !$a == $b), however this difference is only about 0.04 nanoseconds, and they are NOT equivalent.