In PHP I like using Yoda Conditions because there's a common idiom of testing assignment in the conditional: if ($value = getSomeValue()) { // Safely use value } Yoda Conditions defend nicely against accidents when '=' and '==' can be used legally this way and honestly you get used to reading them pretty quick.
C++, for instance however has language syntax to prevent confusion when using this idiom – declarations inside conditionals:
if (auto val = getval())
foo(val); // executed only if getval() returned something that evaluates to true
// in a boolean context
Considering that PHP already has the useless var keyword, they might just adopt something similar in the future if (var $val = getval()) {}