PHP looks simple when you first start using it.

You write some code, refresh the page, and hopefully everything works. 😄

But after working with PHP for a while, you start discovering small behaviors that are not always obvious. Some of them can cause confusing bugs, while others can make your code shorter and cleaner.

In this article, let's look at some useful PHP tricks and behaviors that every PHP developer should know.

1. == and === Are Not the Same