xref: /PHP-8.0/ext/spl/tests/bug53144.phpt (revision d679f022)
1--TEST--
2Bug #53144 (Segfault in SplObjectStorage::removeAll)
3--FILE--
4<?php
5
6$o1 = new StdClass;
7$o2 = new StdClass;
8
9$b = new SplObjectStorage();
10$b[$o1] = "bar";
11$b[$o2] = "baz";
12
13var_dump(count($b));
14$b->removeAll($b);
15var_dump(count($b));
16
17?>
18--EXPECT--
19int(2)
20int(0)
21