Annotation of embedaddon/php/ext/standard/tests/array/bug24766.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #24766 (strange result array from unpack)
! 3: --FILE--
! 4: <?php
! 5:
! 6: error_reporting(E_ALL);
! 7:
! 8: $a = unpack('C2', "\0224V");
! 9: $b = array(1 => 18, 2 => 52);
! 10: debug_zval_dump($a, $b);
! 11: $k = array_keys($a);
! 12: $l = array_keys($b);
! 13: debug_zval_dump($k, $l);
! 14: $i=$k[0];
! 15: var_dump($a[$i]);
! 16: $i=$l[0];
! 17: var_dump($b[$i]);
! 18: ?>
! 19: --EXPECT--
! 20: array(2) refcount(2){
! 21: [1]=>
! 22: long(18) refcount(1)
! 23: [2]=>
! 24: long(52) refcount(1)
! 25: }
! 26: array(2) refcount(2){
! 27: [1]=>
! 28: long(18) refcount(1)
! 29: [2]=>
! 30: long(52) refcount(1)
! 31: }
! 32: array(2) refcount(2){
! 33: [0]=>
! 34: long(1) refcount(1)
! 35: [1]=>
! 36: long(2) refcount(1)
! 37: }
! 38: array(2) refcount(2){
! 39: [0]=>
! 40: long(1) refcount(1)
! 41: [1]=>
! 42: long(2) refcount(1)
! 43: }
! 44: int(18)
! 45: int(18)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>