downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SplObjectStorage::removeAllExcept> <SplObjectStorage::offsetUnset
[edit] Last updated: Fri, 24 Jun 2011

view this page in

SplObjectStorage::removeAll

(PHP 5 >= 5.3.0)

SplObjectStorage::removeAllحذف اشیا شامل شده در انبار دیگر از انبار فعلی

Description

public void SplObjectStorage::removeAll ( SplObjectStorage $storage )

حذف اشیا شامل شده در انبار دیگر از انبار فعلی.

Parameters

storage

انبار شامل اجزای حذفی.

Return Values

No value is returned.

Examples

Example #1 مثال SplObjectStorage::removeAll()

<?php
$o1 
= new StdClass;
$o2 = new StdClass;
$a = new SplObjectStorage();
$a[$o1] = "foo";

$b = new SplObjectStorage();
$b[$o1] = "bar";
$b[$o2] = "gee";

var_dump(count($b));
$b->removeAll($a);
var_dump(count($b));
?>

The above example will output something similar to:

int(2)
int(1)

See Also



add a note add a note User Contributed Notes SplObjectStorage::removeAll - [1 notes]
up
0
rafal dot wrzeszcz at wrzasq dot pl
3 days ago
You can call:

$storage->removeAll($storage);

To remove all elements.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites