code: public static function fromString($stringOrInteger)
      {
          $int = (int)$stringOrInteger;
          $len = strlen($int);
          if ($len < 13 || $len > 16) {
              throw new InvalidArgumentException(
                  sprintf(
                      'Input [%d] must be between 13 and 16 digits, [%d] given.',
                      $int,
                      $len
                  )
              );
          }
  
          if ($len < 16) {
              $int = (int)str_pad($int, 16, '0');
          }
  
          $m = new self();
          $m->int = $int;
          $m->sec = (int)substr($int, 0, 10);
          $m->usec = (int)substr($int, -6);
          return $m;
      }
docs: Create a new object from the integer (or string) version of the microtime.
  
  Total digits would be unix timestamp (10) + (3-6) microtime digits.
  Lack of precision on digits will be automatically padded with zeroes.
  
  @param string|int $stringOrInteger
  
  @return self
  @throws InvalidArgumentException