summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/spl/tests/fixedarray_021.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/spl/tests/fixedarray_021.phpt b/ext/spl/tests/fixedarray_021.phpt
index ecefe56e0e..97b0a70f13 100644
--- a/ext/spl/tests/fixedarray_021.phpt
+++ b/ext/spl/tests/fixedarray_021.phpt
@@ -50,6 +50,15 @@ try {
var_dump($e->getMessage());
}
+//non-long indexes
+$a = new SplFixedArray(4);
+$a["2"] = "foo";
+$a["1"] = "foo";
+$a["3"] = "0";
+
+var_dump(isset($a["0"], $a[-1]), $a["1"]);
+var_dump(empty($a["3"]));
+
?>
==DONE==
--EXPECTF--
@@ -63,4 +72,7 @@ int(0)
object(SplFixedArray)#%d (0) {
}
string(52) "An iterator cannot be used with foreach by reference"
+bool(false)
+string(3) "foo"
+bool(true)
==DONE==