public static function minFromTable(array $table)
    {
        if (!is_array($table)) {
            throw new \InvalidArgumentException('Function require the array,' . gettype($table));
        }

        if (count($table) == 0) {
            throw new \InvalidArgumentException('Table is empty');
        }

        $min = $table[0];

        if ( count($table) > 1)
        {
            foreach($table as $value)
            {
                if ($value < $min) {
                    $min = $value;
                }
            }
        }

        return $min;
    }