{"templateId":"markdown","versions":[{"version":"9.0","label":"9.0","link":"/classes/whmcs/usagebilling/metrics/units/bytes","default":true,"active":true,"folderId":"9d7dc099"},{"version":"8.13","label":"8.13","link":"/classes/8.13/whmcs/usagebilling/metrics/units/bytes","default":false,"active":false,"folderId":"9d7dc099"}],"sharedDataIds":{"sidebar":"sidebar-classes/@8.13/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"WHMCS\\UsageBilling\\Metrics\\Units\\Bytes","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"whmcsusagebillingmetricsunitsbytes","__idx":0},"children":["WHMCS\\UsageBilling\\Metrics\\Units\\Bytes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Class"]}," · extends ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FloatingPoint"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MegaBytes"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods","__idx":1},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"__construct","__idx":2},"children":["__construct"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public function __construct($name = 'Bytes', $singlePerUnitName = 'Byte', $pluralPerUnitName = 'Bytes', $prefix = null, $suffix = 'B')\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"convert","__idx":3},"children":["convert"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"public static function convert($value, $from, $to)\n","lang":"php"},"children":[]}]},"headings":[{"value":"WHMCS\\UsageBilling\\Metrics\\Units\\Bytes","id":"whmcsusagebillingmetricsunitsbytes","depth":1},{"value":"Methods","id":"methods","depth":2},{"value":"__construct","id":"__construct","depth":3},{"value":"convert","id":"convert","depth":3}],"frontmatter":{"title":"WHMCS\\UsageBilling\\Metrics\\Units\\Bytes","seo":{"title":"WHMCS\\UsageBilling\\Metrics\\Units\\Bytes"}},"lastModified":"2026-08-05T14:37:16.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/classes/whmcs/usagebilling/metrics/units/bytes","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}