src/ItePHP/Component/Form/FileField.php
private function phpSizeToBytes($size){  
		if (is_numeric( $size)){
			return $size;
		}
		$suffix = substr($size, -1);
		$value = substr($size, 0, -1);
		switch(strtolower($suffix)){
            /** @noinspection PhpMissingBreakStatementInspection */
            case 'p':
				$value *= 1024;
            /** @noinspection PhpMissingBreakStatementInspection */
            case 't':
				$value *= 1024;
            /** @noinspection PhpMissingBreakStatementInspection */
            case 'g':
				$value *= 1024;
            /** @noinspection PhpMissingBreakStatementInspection */
            case 'm':
				$value *= 1024;
			case 'k':
				$value *= 1024;
				break;
		}
		return $value;  
	}
private function phpSizeToBytes($size){  
		if (is_numeric( $size)){
			return $size;
		}
		$suffix = substr($size, -1);
		$value = substr($size, 0, -1);
		switch(strtolower($suffix)){
            /** @noinspection PhpMissingBreakStatementInspection */
            case 'p':
				$value *= 1024;
            /** @noinspection PhpMissingBreakStatementInspection */
            case 't':
				$value *= 1024;
            /** @noinspection PhpMissingBreakStatementInspection */
            case 'g':
				$value *= 1024;
            /** @noinspection PhpMissingBreakStatementInspection */
            case 'm':
				$value *= 1024;
			case 'k':
				$value *= 1024;
				break;
		}
		return $value;  
	}
Php size format to bytes

@param string $size - php size format
@return int - file size in bytes