SplObjectStorage::detach

(PHP 5 >= 5.1.0, PHP 7)

SplObjectStorage::detachRemoves an object from the storage

˵��

public SplObjectStorage::detach ( object $object ) : void

Removes the object from the storage.

����

object

The object to remove.

����ֵ

û�з���ֵ��

����

Example #1 SplObjectStorage::detach() example

<?php
$o 
= new StdClass;
$s = new SplObjectStorage();
$s->attach($o);
var_dump(count($s));
$s->detach($o);
var_dump(count($s));
?>

�������̵���������ڣ�

int(1)
int(0)

�μ�