xref: /PHP-7.4/ext/standard/tests/array/bug40191.phpt (revision 17ccbeec)
1--TEST--
2Bug #40191 (use of array_unique() with objects triggers segfault)
3--FILE--
4<?php
5
6$arrObj = new ArrayObject();
7$arrObj->append('foo');
8$arrObj->append('bar');
9$arrObj->append('foo');
10
11$arr = array_unique($arrObj);
12var_dump($arr);
13
14echo "Done\n";
15?>
16--EXPECTF--
17Warning: array_unique() expects parameter 1 to be array, object given in %s on line %d
18NULL
19Done
20