1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/spl/tests/observer_009.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

28 lines
494 B
PHP

--TEST--
SPL: SplObjectStorage addAll/removeAll
--FILE--
<?php
class Foo {}
$storageA = new \SplObjectStorage();
$storageA->attach(new \Foo);
$storageA->attach(new \Foo);
echo ("Count storage A: " . count($storageA));
foreach ($storageA as $object) {
echo ' x ';
}
echo "\n";
$storageB = clone $storageA;
echo ("Count storage B: " . count($storageB));
foreach ($storageB as $object) {
echo ' x ';
}
echo "\n";
?>
--EXPECT--
Count storage A: 2 x x
Count storage B: 2 x x