Document 32-bit platform limitation for Timestamp arguments

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 1.4.0-beta1, 1.4.0
    • Affects Version/s: 1.1.2
    • Component/s: Docs
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The BSON timestamp type consists of two unsigned 32-bit values (timestamp and increment). Since PHP has no unsigned integer type, the full range of values cannot be expressed on a 32-bit platform.

      Technically, we could accept signed 32-bit integers in PHP and cast them to unsigned, but this would lead to some confusing documentation and create a case where negative numbers are acceptable on a 32-bit platform but not 64-bit platforms. Instead, we should simply document the limitations on 32-bit platforms.

      Note: the __toString() handler will still print the components as unsigned 32-bit integers on both platforms (per the PR for PHPC-594).

              Assignee:
              Derick Rethans
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: