public static function getLastRow(array $array)
    {
        /*
         * No elements?
         * Nothing to do
         */
        if (empty($array)) {
            return null;
        }

        $effect = [];
        $last = end($array);

        if (is_array($last)) {
            // We've got an array, so looking for the last row of array will be done recursively
            $effect = self::getLastRow($last);

            /*
             * The last row is not an array or it's an empty array?
             * Let's use the previous candidate
             */
            if (!is_array($effect) || (is_array($effect) && empty($effect))) {
                $effect = $last;
            }
        }

        return $effect;
    }