File: files/commonfiles/include/xoops_version.inc.php

Recommend this page to a friend!
  Classes of Goffy G  >  XOOPS Modules Builder  >  files/commonfiles/include/xoops_version.inc.php  >  Download  
File: files/commonfiles/include/xoops_version.inc.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: XOOPS Modules Builder
Generate new modules for the XOOPS CMS
Author: By
Last change:
Date: 2 months ago
Size: 1,068 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 (https://www.gnu.org/licenses/gpl-2.0.html)
 * @package
 * @since
 * @author XOOPS Development Team
 * @param mixed $val
 */

/**
 * @param $val
 * @return float|int
 */
function modulebuilderReturnBytes($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;
    }
}


For more information send a message to info at phpclasses dot org.