diff options
author | Matt Wilmas <mattwil@php.net> | 2009-06-07 19:28:02 +0000 |
---|---|---|
committer | Matt Wilmas <mattwil@php.net> | 2009-06-07 19:28:02 +0000 |
commit | 756d134c45dffea28ba861106408f6eec99193d2 (patch) | |
tree | adff202ea0a4a2012a59d28e4cbfe648788e2b7a /Zend/tests/bug47836.phpt | |
parent | b412586e4fc503465e238a0d4f909728e27e2dd9 (diff) | |
download | php-git-756d134c45dffea28ba861106408f6eec99193d2.tar.gz |
Fixed bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value)
Also simplified related array_push() test
Diffstat (limited to 'Zend/tests/bug47836.phpt')
-rw-r--r-- | Zend/tests/bug47836.phpt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Zend/tests/bug47836.phpt b/Zend/tests/bug47836.phpt new file mode 100644 index 0000000000..5a93a44c71 --- /dev/null +++ b/Zend/tests/bug47836.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value) +--FILE-- +<?php + +$arr[PHP_INT_MAX] = 1; +$arr[] = 2; + +var_dump($arr); +?> +--EXPECTF-- +Warning: Cannot add element to the array as the next element is already occupied in %s on line 4 +array(1) { + [%d]=> + int(1) +} |