I've been looking through Zend Framework's source code and noticed that most (if not all) comparisons are done with the operands in the reverse order I would expect:

if ((false !== $request) {

instead of:

if (($request !== false) {

What is the reason for this convention?

Accepted Answer

It's called a Left-Hand Comparison.

Basically, it's so that if you forget to put the second = in ==, it'll error rather change the value of the variable...

Written by ircmaxell
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki