Annotation of embedaddon/php/ext/json/tests/bug40503.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #40503 (json_encode() value corruption on 32bit systems with overflown values)
        !             3: --INI--
        !             4: precision=14
        !             5: --SKIPIF--
        !             6: <?php if (!extension_loaded("json")) print "skip"; ?>
        !             7: --FILE--
        !             8: <?php
        !             9: function show_eq($x,$y) {
        !            10:        echo "$x ". ($x==$y ? "==" : "!=") ." $y\n";
        !            11: }
        !            12: 
        !            13: $value = 0x7FFFFFFF; #2147483647;
        !            14: show_eq("$value", json_encode($value));
        !            15: $value++;
        !            16: show_eq("$value", json_encode($value));
        !            17: 
        !            18: ?>
        !            19: --EXPECT--
        !            20: 2147483647 == 2147483647
        !            21: 2147483648 == 2147483648

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>