From: Etienne Kneuss Date: Mon, 28 Jul 2008 14:24:45 +0000 (+0000) Subject: MFH: Increase coverage a bit X-Git-Tag: php-5.3.0alpha1~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1da16cef08035a3efe1ce5238a171f34c26ed6ed;p=php MFH: Increase coverage a bit --- 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==