From: Etienne Kneuss Date: Mon, 28 Jul 2008 14:24:35 +0000 (+0000) Subject: Increase coverage a bit X-Git-Tag: BEFORE_HEAD_NS_CHANGE~994 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03de75498d8e74e0bce8a1c588a9914a6c29e350;p=php Increase coverage a bit --- diff --git a/ext/spl/tests/fixedarray_021.phpt b/ext/spl/tests/fixedarray_021.phpt index aa8de1d34e..bb13300c00 100644 --- a/ext/spl/tests/fixedarray_021.phpt +++ b/ext/spl/tests/fixedarray_021.phpt @@ -50,6 +50,17 @@ 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 +74,7 @@ int(0) object(SplFixedArray)#%d (0) { } unicode(52) "An iterator cannot be used with foreach by reference" +bool(false) +unicode(3) "foo" +bool(true) ==DONE==