File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / wddx / tests / bug35410_64bit.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:05 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
#35410 (wddx_deserialize() doesn't handle large ints as keys properly)
--SKIPIF--
<?php 
	if (!extension_loaded("wddx")) print "skip"; 
	if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
$wddx = <<<WDX
<wddxpacket version="1.0">
<header>
<comment>Content Configuration File</comment>
</header>
<data>
<struct>
<var name="content_queries">
<struct>
<var name="content_113300831086270200">
<struct>
<var name="113301888545229100">
<struct>
<var name="max">
<number>10</number>
</var>
<var name="cache">
<number>4</number>
</var>
<var name="order">
<struct>
<var name="content_113300831086270200">
<struct>
<var name="CMS_BUILD">
<string>desc</string>
</var>
</struct>
</var>
</struct>
</var>
</struct>
</var>
</struct>
</var>
</struct>
</var>
</struct>
</data>
</wddxpacket>
WDX;

var_dump(wddx_deserialize($wddx));
?>
--EXPECT--
array(1) {
  ["content_queries"]=>
  array(1) {
    ["content_113300831086270200"]=>
    array(1) {
      [113301888545229100]=>
      array(3) {
        ["max"]=>
        int(10)
        ["cache"]=>
        int(4)
        ["order"]=>
        array(1) {
          ["content_113300831086270200"]=>
          array(1) {
            ["CMS_BUILD"]=>
            string(4) "desc"
          }
        }
      }
    }
  }
}

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