1--TEST--
2Check that SplArray::fromArray will not allow integer overflows
3--CREDITS--
4Rob 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
10try {
11  $splArray->fromArray($array);
12} catch (Exception $e) {
13  echo $e->getMessage();
14}
15?>
16--EXPECT--
17integer overflow detected
18