IDE extension that lets you fix coding issues before they exist!
Setup is effortless and analysis is automatic for most languages
Fast, accurate analysis; enterprise scalability
Using count() to test for emptiness works, but using empty() makes the code more readable and can be more performant
count()
empty()
if (count($a) > 0) { // Noncompliant echo $a[0]; }
if (!empty($a)) { echo $a[0]; }