Numeric keys limited to unsigned 32-bit integer

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.1.4
    • Affects Version/s: 1.1.3
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      https://github.com/mongodb/mongo-php-driver/issues/256

      Example script:

      <?php
      $data = [
          '9781449410247' => 'a',
          'X9781449410247' => 'b',
          9781449410248 => 'c',
      ];
      $bson = MongoDB\BSON\fromPHP($data);
      $json = MongoDB\BSON\toJSON($bson);
      
      echo $json;
      ?>
      

      This outputs:

      { "1808877255" : "a", "X9781449410247" : "b", "1808877256" : "c" }
      

            Assignee:
            Jeremy Mikola
            Reporter:
            Derick Rethans
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: