--TEST--
Double type: -1.23456789012345677E+18
--XFAIL--
Variation in double's string representation (SPEC-850)
--DESCRIPTION--
Generated by scripts/convert-bson-corpus-tests.php

DO NOT EDIT THIS FILE
--FILE--
<?php

require_once __DIR__ . '/../utils/tools.php';

$canonicalBson = hex2bin('1000000001640081E97DF41022B1C300');
$canonicalExtJson = '{"d" : {"$numberDouble": "-1.23456789012345677E+18"}}';
$relaxedExtJson = '{"d" : -1.23456789012345677E+18}';

// Canonical BSON -> Native -> Canonical BSON 
echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n";

// Canonical BSON -> Canonical extJSON 
echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n";

// Canonical BSON -> Relaxed extJSON 
echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n";

// Canonical extJSON -> Canonical BSON 
echo bin2hex(fromJSON($canonicalExtJson)), "\n";

// Relaxed extJSON -> BSON -> Relaxed extJSON 
echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n";

?>
===DONE===
<?php exit(0); ?>
--EXPECT--
1000000001640081e97df41022b1c300
{"d":{"$numberDouble":"-1.23456789012345677E+18"}}
{"d":-1.2345678901234568e+18}
1000000001640081e97df41022b1c300
{"d":-1.2345678901234568e+18}
===DONE===