PHP Classes

File: include/xoops_version.inc.php

Recommend this page to a friend!
  Classes of Goffy G   wgTeams   include/xoops_version.inc.php   Download  
File: include/xoops_version.inc.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: wgTeams
Module for the XOOPS CMS to present people teams
Author: By
Last change:
Date: 3 years ago
Size: 1,040 bytes
 

Contents

Class file image Download
<?php
/*
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

/**
 * @copyright XOOPS Project https://xoops.org/
 * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package
 * @since
 * @author XOOPS Development Team
 */

/**
 * @param $val
 * @return float|int
 */
function wgteamsReturnBytes($val)
{
    switch (
mb_substr($val, -1)) {
        case
'K':
        case
'k':
            return (int)
$val * 1024;
        case
'M':
        case
'm':
            return (int)
$val * 1048576;
        case
'G':
        case
'g':
            return (int)
$val * 1073741824;
        default:
            return
$val;
    }
}