Annotation of embedaddon/php/Zend/tests/bug46701.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #46701 (Creating associative array with long values in the key fails on 32bit linux)
3: --SKIPIF--
4: <?php if (PHP_INT_SIZE != 4) die('skip this test is for 32bit platforms only'); ?>
5: --FILE--
6: <?php
7:
8: $test_array = array(
9: 0xcc5c4600 => 1,
10: 0xce331a00 => 2
11: );
12: $test_array[0xce359000] = 3;
13:
14: var_dump($test_array);
15: var_dump($test_array[0xce331a00]);
16:
17: class foo {
18: public $x;
19:
20: public function __construct() {
21: $this->x[0xce359000] = 3;
22: var_dump($this->x);
23: }
24: }
25:
26: new foo;
27:
28: ?>
29: --EXPECT--
30: array(3) {
31: [-866368000]=>
32: int(1)
33: [-835511808]=>
34: int(2)
35: [-835350528]=>
36: int(3)
37: }
38: int(2)
39: array(1) {
40: [-835350528]=>
41: int(3)
42: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>