Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-599

Document 32-bit platform limitation for Timestamp arguments

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.0-beta1, 1.4.0
    • Affects Version/s: 1.1.2
    • Component/s: Docs
    • 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 Derick Rethans
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: