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

Allow cross-platform serialization of Timestamp and UTCDateTime

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0, 1.2.0-alpha2
    • Labels:
      None

      Description

      Opening this as a tracking ticket. We can debate whether it is worth implementing down the line.

      With PHPC-460, our BSON types are serializing the same properties reported by var_dump(), since we use the same get_properties handler. Since both Timestamp components are unsigned 32-bit integers, a 64-bit PHP system might report a positive integer (e.g. 4294967295) that cannot be unserialized on a 32-bit platform.

      Since UTCDateTime is a 64-bit integer, we'd likely serialize it as a string on 32-bit platforms and an integer on 64-bit platforms.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: