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]; }