Don’t use loose comparison, always be as strict as possible.
// Bad:
if ($a == $b) {/* ... */}
// Good:
if ($a === $b) {/* ... */}
When calling functions in a namespaced context, additional actions are triggered in PHP which result in slower execution.
// solution 1:
namespace baz;
\foo();
// solution 2:
namespace baz;
use function foo;
foo();