Skip to content

SPL - 接口

  1. Countable

继承了Countable 的类可以使用count函数来调用 类中的count 方法

PHP
Countable {
    /* 方法 */
    abstract public int count ( void )
}

示例:

http://php.net/manual/en/class.countable.php

  1. OuterIterator
  2. RecursiveIterator
  3. SeekableIterator