private static function toBytes($phpSyntax)
    {
        $val = trim($phpSyntax);
        $last = strtolower($val[strlen($val) - 1]);
        if (!is_numeric($last)) {
            $val = substr($val, 0, -1);
            switch ($last) {
                case 'g':
                    $val *= 1024;
                case 'm':
                    $val *= 1024;
                case 'k':
                    $val *= 1024;
            }
        }
        return $val;
    }
private static function toBytes($phpSyntax)
    {
        $val = trim($phpSyntax);
        $last = strtolower($val[strlen($val) - 1]);
        if (!is_numeric($last)) {
            $val = substr($val, 0, -1);
            switch ($last) {
                case 'g':
                    $val *= 1024;
                case 'm':
                    $val *= 1024;
                case 'k':
                    $val *= 1024;
            }
        }
        return $val;
    }
private static function toBytes ( $ phpSyntax ) { $ val = trim ( $ phpSyntax ) ; $ last = strtolower ( $ val [ strlen ( $ val ) - 1 ] ) ; if ( ! is_numeric ( $ last ) ) { $ val = substr ( $ val , 0 , - 1 ) ; switch ( $ last ) { case 'g' : $ val *= 1024 ; case 'm' : $ val *= 1024 ; case 'k' : $ val *= 1024 ; } } return $ val ; }
Get the size in bytes of a PHP variable given as a string.

@param  string $phpSyntax The PHP syntax to describe the variable.
@return int The size in bytes.
Get the size in bytes of a PHP variable given as a string .