|
update : 2015.11.03
php.shukuma.com검색:
|
The SplObjectStorage class(PHP 5 >= 5.3.0) 소개The SplObjectStorage class provides a map from objects to data or, by ignoring data, an object set. This dual purpose can be useful in many cases involving the need to uniquely identify objects. 클래스 개요/* 메소드 */
}예제
Example #1 SplObjectStorage as a set
<?php위 예제의 출력: bool(true) bool(true) bool(false) bool(true) bool(false) bool(false) Example #2 SplObjectStorage as a map
<?php위 예제의 출력:
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
Table of Contents
|