blob: 038104b57ff203ef384024611afd72f06994fdc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--TEST--
Bug #40191 (use of array_unique() with objects triggers segfault)
--SKIPIF--
<?php if (!extension_loaded('spl')) die("skip SPL is not available"); ?>
--FILE--
<?php
$arrObj = new ArrayObject();
$arrObj->append('foo');
$arrObj->append('bar');
$arrObj->append('foo');
$arr = array_unique($arrObj);
var_dump($arr);
echo "Done\n";
?>
--EXPECTF--
array(2) {
[0]=>
string(3) "foo"
[1]=>
string(3) "bar"
}
Done
|