summaryrefslogtreecommitdiff
path: root/ext/spl/tests/splfixedarray_offsetExists_larger.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/splfixedarray_offsetExists_larger.phpt')
-rw-r--r--ext/spl/tests/splfixedarray_offsetExists_larger.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/spl/tests/splfixedarray_offsetExists_larger.phpt b/ext/spl/tests/splfixedarray_offsetExists_larger.phpt
new file mode 100644
index 0000000..9449d64
--- /dev/null
+++ b/ext/spl/tests/splfixedarray_offsetExists_larger.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Checks that offsetExists() does not accept a value larger than the array.
+--CREDITS--
+ PHPNW Test Fest 2009 - Rick Ogden
+--FILE--
+<?php
+$ar = new SplFixedArray(3);
+$ar[0] = 1;
+$ar[1] = 2;
+$ar[2] = 3;
+
+var_dump($ar->offsetExists(4));
+?>
+--EXPECT--
+bool(false)