2007-01-22 08:17:26 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #40191 (use of array_unique() with objects triggers segfault)
|
2007-01-22 08:21:57 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php if (!extension_loaded('spl')) die("skip SPL is not available"); ?>
|
2007-01-22 08:17:26 +00:00
|
|
|
--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--
|
2008-08-29 03:05:43 +00:00
|
|
|
Warning: array_unique() expects parameter 1 to be array, object given in %s on line %d
|
|
|
|
NULL
|
2007-01-22 08:17:26 +00:00
|
|
|
Done
|