PHP

Avoid Yoda conditions

5

After blogging about the semantic importance of void as pseudo type I feel like I should also point out the nonsense of Yoda conditions. Those are still used quite a bit in the coding world, mainly in and around WordPress…

PHP

Return null vs return void

0

The other day I had a discussion about that, and why important open source frameworks like CakePHP use void in @return doc tags when void and null are code-wise totally identical. So here my reasoning why it is a good…