/PHP-7.4/ext/spl/tests/ |
H A D | recursive_tree_iterator_006.phpt | 28 public $it; 29 function __construct($it) { 30 $this->it = new RecursiveArrayIterator($it); 33 return $this->it; 37 $it = new RecursiveArrayIteratorAggregated($ary); 39 foreach(new RecursiveTreeIterator($it) as $k => $v) { 43 foreach(new RecursiveTreeIterator($it, RecursiveTreeIterator::BYPASS_CURRENT) as $k => $v) { 47 foreach(new RecursiveTreeIterator($it, RecursiveTreeIterator::BYPASS_CURRENT|RecursiveTreeIterator:… 51 foreach(new RecursiveTreeIterator($it, 0) as $k => $v) { 55 foreach(new RecursiveTreeIterator($it, 0, CachingIterator::CATCH_GET_CHILD) as $k => $v) {
|
H A D | iterator_026.phpt | 8 $it = new RecursiveArrayIterator($ar); 9 $it = new RecursiveCachingIterator($it); 10 $it = new RecursiveIteratorIterator($it); 12 foreach($it as $k=>$v) 15 echo "hasNext: " . ($it->getInnerIterator()->hasNext() ? "yes" : "no") . "\n";
|
H A D | iterator_013.phpt | 8 $it = new AppendIterator; 10 foreach($it as $key=>$val) 17 $it->append(new ArrayIterator(array(0 => 'A', 1 => 'B'))); 19 foreach($it as $key=>$val) 26 foreach($it as $key=>$val) 33 $it->append(new ArrayIterator(array(2 => 'C', 3 => 'D'))); 35 foreach(new NoRewindIterator($it) as $key=>$val) 42 foreach($it as $key=>$val)
|
H A D | array_013.phpt | 14 $it = new ArrayIterator($a); 16 foreach($it as $key => $val) 23 $it->append('three'); 24 $it->append('four'); 26 foreach(new NoRewindIterator($it) as $key => $val) 43 $it = new ArrayIterator($o); 45 foreach($it as $key => $val) 52 $it->append('three'); 53 $it->append('four'); 55 foreach(new NoRewindIterator($it) as $key => $val)
|
H A D | spl_004.phpt | 33 $it = new RecursiveArrayIterator(array(1, array(21, 22), 3)); 35 var_dump(iterator_apply($it, 'test', NULL)); 38 var_dump(iterator_apply($it, 'test_arg', array($it))); 41 $it = new RecursiveIteratorIterator($it); 42 var_dump(iterator_apply($it, 'test')); 46 var_dump(iterator_apply($it, 'test', 1)); 50 var_dump(iterator_apply($it, 'non_existing_function')); 51 var_dump(iterator_apply($it, 'non_existing_function', NULL, 2));
|
H A D | iterator_012.phpt | 8 $it = new NoRewindIterator(new ArrayIterator(array(0 => 'A', 1 => 'B', 2 => 'C'))); 10 echo $it->key() . '=>' . $it->current() . "\n"; 14 $it->next(); 18 foreach($it as $key=>$val)
|
H A D | iterator_043.phpt | 6 $it = new RecursiveCachingIterator(new RecursiveArrayIterator(array(1,2))); 8 var_dump($it->getChildren()); 9 $it->rewind(); 10 var_dump($it->getChildren());
|
H A D | bug66702.phpt | 9 $it = new \ArrayIterator(array("foo", "bar", "baz")); 10 $it2 = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH); 12 $it2 = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH, \RegexIterator::INVERT_MATCH); 15 $it = new \ArrayIterator(array("foo" => 1, "bar" => 2, "baz" => 3)); 16 $it2 = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH, \RegexIterator::USE_KEY); 18 $it2 = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH, \RegexIterator::USE_KEY | \RegexIter…
|
H A D | iterator_024.phpt | 10 $it = new ArrayObject($ar); 11 var_dump($it->getIteratorClass()); 24 $it->setIteratorClass("RecursiveArrayIterator"); 25 var_dump($it->getIteratorClass()); 26 foreach(new RecursiveIteratorIterator($it) as $v) echo "$v\n"; 40 An instance of RecursiveIterator or IteratorAggregate creating it is required
|
H A D | CallbackFilterIteratorTest.phpt | 39 $it = new ArrayIterator(range(1, 5)); 40 $it = new CallbackFilterIterator($it, $callback); 44 foreach($it as $value) { 50 $it = new ArrayIterator(range(1, 5)); 51 $it = new CallbackFilterIterator($it, $test()); 54 foreach($it as $value) {
|
H A D | iterator_042.phpt | 14 $it = new AppendIterator; 17 $it->append(array()); 21 $it->append(new ArrayIterator(array(1))); 22 $it->append(new ArrayIterator(array(21, 22))); 24 var_dump($it->getArrayIterator()); 26 $it->append(new ArrayIterator(array(31, 32, 33))); 28 var_dump($it->getArrayIterator()); 32 foreach($it as $k => $v) 35 var_dump($it->getIteratorIndex());
|
H A D | bug75173.phpt | 6 $it = new \AppendIterator(); 7 $it->append(new ArrayIterator(['foo'])); 9 foreach ($it as $item) { 13 $it->append(new ArrayIterator(['bar']));
|
H A D | iterator_046.phpt | 16 function __construct(Iterator $it, $flags = 0) 18 parent::__construct($it, $flags); 37 $it = new MyCachingIterator(new ArrayIterator(array(0, 'foo'=>1, 'bar'=>2)), CachingIterator::TOSTR… 39 $it->fill(); 40 $it->show();
|
H A D | array_016.phpt | 6 $it = new ArrayIterator(range(0,3)); 8 foreach(new IteratorIterator($it) as $v) 13 $it = new ArrayObject(range(0,3)); 15 foreach(new IteratorIterator($it) as $v)
|
H A D | array_015.phpt | 16 $it = $ar->getIterator(); 18 $ar->offsetUnset($it->key()); 19 $it->next(); 21 var_dump($it->current()); 24 foreach($it as $k => $v) 32 foreach($it as $k => $v)
|
H A D | bug67539.phpt | 6 $it = new ArrayIterator(array_fill(0,2,'X'), 1 ); 9 $GLOBALS['it']->unserialize($GLOBALS['it']->serialize()); 13 $it->uksort('badsort');
|
/PHP-7.4/ext/zlib/tests/ |
H A D | gzfile_variation11.phpt | 38 string(38) "all I know is that you can realize it 44 string(19) "as it turns around 47 string(39) "and I know that it descends down on me 58 string(38) "all I know is that you can realize it 64 string(19) "as it turns around 67 string(39) "and I know that it descends down on me 78 string(38) "all I know is that you can realize it 84 string(19) "as it turns around 98 string(38) "all I know is that you can realize it 104 string(19) "as it turns around [all …]
|
H A D | gzfile_variation12.phpt | 36 string(38) "all I know is that you can realize it 42 string(19) "as it turns around 45 string(39) "and I know that it descends down on me 56 string(38) "all I know is that you can realize it 62 string(19) "as it turns around 65 string(39) "and I know that it descends down on me 76 string(38) "all I know is that you can realize it 82 string(19) "as it turns around 85 string(39) "and I know that it descends down on me 96 string(38) "all I know is that you can realize it [all …]
|
H A D | gzfile_variation9.phpt | 35 string(38) "all I know is that you can realize it 41 string(19) "as it turns around 44 string(39) "and I know that it descends down on me 55 string(38) "all I know is that you can realize it 61 string(19) "as it turns around 64 string(39) "and I know that it descends down on me 75 string(38) "all I know is that you can realize it 81 string(19) "as it turns around 84 string(39) "and I know that it descends down on me 95 string(38) "all I know is that you can realize it [all …]
|
H A D | readgzfile_variation10.phpt | 35 all I know is that you can realize it 37 as it turns around 38 and I know that it descends down on me 42 all I know is that you can realize it 44 as it turns around 45 and I know that it descends down on me 55 all I know is that you can realize it 57 as it turns around 58 and I know that it descends down on me 62 all I know is that you can realize it [all …]
|
/PHP-7.4/Zend/tests/ |
H A D | bug71154.phpt | 11 * However it will also be reused on next foreach iteration */ 12 $it = new ArrayIterator([1, 2, 3]); 13 $it->rewind(); 15 var_dump($it->current());
|
/PHP-7.4/Zend/tests/generators/ |
H A D | generator_in_multipleiterator.phpt | 16 $it = new MultipleIterator; 17 $it->attachIterator(gen1()); 18 $it->attachIterator(gen2()); 20 foreach ($it as $values) {
|
/PHP-7.4/Zend/tests/type_declarations/ |
H A D | typed_properties_079.phpt | 7 static iterable $it = []; 11 A::$a = &A::$it; 14 A::$it = new ArrayIterator(); 16 var_dump(A::$it); 20 A::$it = new ArrayIterator();
|
/PHP-7.4/ext/intl/tests/ |
H A D | breakiter_getPartsIterator_var1.phpt | 14 $it = IntlBreakIterator::createWordInstance(NULL); 15 $it->setText($text); 17 var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_SEQUENTIAL))); 18 var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_LEFT))); 19 var_dump(iterator_to_array($it->getPartsIterator(IntlPartsIterator::KEY_RIGHT)));
|
/PHP-7.4/ext/phar/tests/ |
H A D | phar_oo_005.phpt | 15 $it = new RecursiveDirectoryIterator('phar://'.$fname); 16 $it = new RecursiveIteratorIterator($it); 18 foreach($it as $name => $ent) 22 var_dump(str_replace('\\', '/', $it->getSubPath())); 23 var_dump(str_replace('\\', '/', $it->getSubPathName())); 24 $sub = $it->getPathInfo();
|