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

BSON classes should support PHP serialization and var_export()

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0-alpha1, 1.2.0
    • Affects Version/s: 1.0.0-beta2
    • Component/s: None
    • Labels:
      None

      Note that the timestamp bytes differ:

      >>> $o = new MongoDB\BSON\ObjectId
      => <MongoDB\BSON\ObjectID #000000002a26d11f00007f67ae06a97f> {}
      
      >>> $s = serialize($o)
      => "O:21:\"MongoDB\\BSON\\ObjectID\":0:{}"
      
      >>> unserialize($s)
      => <MongoDB\BSON\ObjectID #000000002a26d11500007f67ae06a97f> {}
      

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: