Annotation of embedaddon/php/ext/spl/tests/SplArray_fromArray.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Check that SplArray::fromArray will not allow integer overflows
3: --CREDITS--
4: Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009
5: --FILE--
6: <?php
7: $array = array(PHP_INT_MAX => 'foo');
8: $splArray = new SplFixedArray();
9:
10: try {
11: $splArray->fromArray($array);
12: } catch (Exception $e) {
13: echo $e->getMessage();
14: }
15: ?>
16: --EXPECT--
17: integer overflow detected
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>