编程语言php迭代器,php代器
php迭代器,php代器
implements Iterator , 实现Iterator 的 current(); next(); key(); valid(); rewind();
<? myIterator = 0 __construct( -> = ( ->position = 0 ( (->[-> ( ->[-> ( -> ( ++ -> = "firstelement", "secondeleent", "lastelement" = myIterator( ( => .' => '. " " }
执行结果:
文章来源:https://www.php.cn/faq/163634.html
赞 (0)