From: Antony Dovgal Date: Mon, 19 Sep 2005 18:58:59 +0000 (+0000) Subject: MF5.0: add new test X-Git-Tag: php-5.1.0RC2~222 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33d913d9da9a10e56cdfb88a6a4c7c700968c817;p=php MF5.0: add new test --- diff --git a/ext/spl/tests/bug34548.phpt b/ext/spl/tests/bug34548.phpt new file mode 100644 index 0000000000..dff1375ab0 --- /dev/null +++ b/ext/spl/tests/bug34548.phpt @@ -0,0 +1,38 @@ +--TEST-- +bug #34548 (Method append() in class extended from ArrayObject crashes PHP) +--FILE-- +append($value); + } + + public function offsetSet($index, $value) + { + parent::offsetSet($index, $value); + } +} + +$data1=array('one', 'two', 'three'); +$data2=array('four', 'five'); + +$foo=new Collection($data1); +$foo->add($data2); + +print_r($foo->getArrayCopy()); + +echo "Done\n"; +?> +--EXPECT-- +Array +( + [0] => one + [1] => two + [2] => three + [3] => four + [4] => five +) +Done