public static function isLastElement(array $aArray, $sKey) { end($aArray); return $sKey === key($aArray); }