In https://github.com/php/php-src/blob/879cd0491399ccfacac0d6ed701d998a65a6cc97/ext/reflection/php_reflection.c we can see that ReflectionClass::isIterateable() is an alias for ReflectionClass::isIterable().
(PHP 5, PHP 7)
ReflectionClass::isIterateable — Checks if iterateable
Checks whether the class is iterateable.
이 함수는 인수가 없습니다.
성공 시 TRUE
를, 실패 시 FALSE
를 반환합니다.
Example #1 ReflectionClass::isIterateable() example
<?php
class IteratorClass implements Iterator {
public function __construct() { }
public function key() { }
public function current() { }
function next() { }
function valid() { }
function rewind() { }
}
class DerivedClass extends IteratorClass { }
class NonIterator { }
function dump_iterateable($class) {
$reflection = new ReflectionClass($class);
var_dump($reflection->isIterateable());
}
$classes = array("ArrayObject", "IteratorClass", "DerivedClass", "NonIterator");
foreach ($classes as $class) {
echo "Is $class iterateable? ";
dump_iterateable($class);
}
?>
위 예제의 출력:
Is ArrayObject iterateable? bool(true) Is IteratorClass iterateable? bool(true) Is DerivedClass iterateable? bool(true) Is NonIterator iterateable? bool(false)
In https://github.com/php/php-src/blob/879cd0491399ccfacac0d6ed701d998a65a6cc97/ext/reflection/php_reflection.c we can see that ReflectionClass::isIterateable() is an alias for ReflectionClass::isIterable().