I think that the real question here is not how you do this, but why are you doing this... If you know that the "&&" operator works, then why aren't you using it!!!
The hallmark of good code is not that is it brilliant or different than anyone elses, it is exactly the opposite. Good code is code that can be understood by the beginning programmer, and every beginning programmer is taught to use the && operator in this situation.. It is there because it works for exactly this, and it is probably way faster than using "grep" or any other mathematical thing that you come up with if(($b == $a) == $c/$a) or some such thing...!!! ARGH.. dont be different CONFORM!!!!!
lol.. some of that last stuff is joking but really please wrote code that is easy to understand...