File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug46701.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month 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

    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>