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

Support overloaded operators for Int64 objects

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.16.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      This is a tracking ticket to implement overloaded arithmetic, comparison, and bitwise operators for Int64 objects, as is done for GMP objects.

      There will be some open questions if we allow computations involving Int64 objects are PHP numeric scalars. For example, we could only return an Int64 when absolutely necessary:

      Int64(0) + 1 // int(1)
      
      Int64(2147483647) + 1 // Int64(2147483648) on 32-bit platforms
      Int64(2147483647) + 1 // int(2147483648) on 64-bit platforms
      

      We should look to GMP or other extensions for guidance here.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: