/PHP-8.4/ext/intl/resourcebundle/ |
H A D | resourcebundle_iterator.c | 39 if (iterator->is_table) { in resourcebundle_iterator_read() 59 if (iterator->currentkey) { in resourcebundle_iterator_invalidate() 61 iterator->currentkey = NULL; in resourcebundle_iterator_invalidate() 82 return (iterator->i < iterator->length) ? SUCCESS : FAILURE; in resourcebundle_iterator_has_more() 93 return &iterator->current; in resourcebundle_iterator_current() 106 if (iterator->is_table) { in resourcebundle_iterator_key() 119 iterator->i++; in resourcebundle_iterator_step() 129 iterator->i = 0; in resourcebundle_iterator_reset() 163 iterator->subject = rb; in resourcebundle_get_iterator() 172 iterator->currentkey = NULL; in resourcebundle_get_iterator() [all …]
|
/PHP-8.4/ext/mysqli/ |
H A D | mysqli_result_iterator.c | 44 php_mysqli_result_iterator *iterator; in php_mysqli_result_get_iterator() local 52 zend_iterator_init(&iterator->intern); in php_mysqli_result_get_iterator() 57 iterator->result = Z_MYSQLI_P(object); in php_mysqli_result_get_iterator() 58 iterator->row_num = -1; in php_mysqli_result_get_iterator() 60 return &iterator->intern; in php_mysqli_result_get_iterator() 70 zval_ptr_dtor(&iterator->intern.data); in php_mysqli_result_iterator_dtor() 71 zval_ptr_dtor(&iterator->current_row); in php_mysqli_result_iterator_dtor() 89 return &iterator->current_row; in php_mysqli_result_iterator_current_data() 106 iterator->row_num++; in php_mysqli_result_iterator_move_forward() 128 iterator->row_num = -1; in php_mysqli_result_iterator_rewind() [all …]
|
/PHP-8.4/ext/zend_test/ |
H A D | iterators.c | 40 zval_ptr_dtor(&iterator->intern.data); in test_traversable_it_dtor() 46 ZVAL_LONG(&iterator->current, 0); in test_traversable_it_rewind() 52 ZVAL_LONG(&iterator->current, Z_LVAL(iterator->current) + 1); in test_traversable_it_next() 58 if (Z_LVAL(iterator->current) < 4) { in test_traversable_it_valid() 67 ZVAL_LONG(return_value, Z_LVAL(iterator->current)); in test_traversable_it_key() 73 return &iterator->current; in test_traversable_it_current() 92 test_traversable_it *iterator; in test_traversable_get_iterator() local 99 iterator = emalloc(sizeof(test_traversable_it)); in test_traversable_get_iterator() 100 zend_iterator_init((zend_object_iterator*)iterator); in test_traversable_get_iterator() 104 ZVAL_LONG(&iterator->current, 0); in test_traversable_get_iterator() [all …]
|
/PHP-8.4/ext/dom/ |
H A D | dom_iterators.c | 96 zval_ptr_dtor(&iterator->intern.data); in php_dom_iterator_dtor() 97 zval_ptr_dtor(&iterator->curobj); in php_dom_iterator_dtor() 116 return Z_ISUNDEF(iterator->curobj) ? NULL : &iterator->curobj; in php_dom_iterator_current_data() 123 zval *object = &iterator->intern.data; in php_dom_iterator_current_key() 167 if (Z_ISUNDEF(iterator->curobj)) { in php_dom_iterator_move_forward() 184 zval_ptr_dtor(&iterator->curobj); in php_dom_iterator_move_forward() 230 zval_ptr_dtor(&iterator->curobj); in php_dom_iterator_move_forward() 231 ZVAL_UNDEF(&iterator->curobj); in php_dom_iterator_move_forward() 257 php_dom_iterator *iterator; in php_dom_get_iterator() local 270 ZVAL_UNDEF(&iterator->curobj); in php_dom_get_iterator() [all …]
|
/PHP-8.4/ext/dom/tests/modern/token_list/ |
H A D | iterator_modification_invalidation.phpt | 2 Test DOMTokenList iterator invalidation after modification 24 $iterator = $list->getIterator(); 25 $iterator->next(); 27 var_dump($iterator->key()); 28 var_dump($iterator->current()); 29 $iterator->rewind(); 30 var_dump($iterator->key()); 31 var_dump($iterator->current()); 33 var_dump($iterator->key()); 34 var_dump($iterator->current()); [all …]
|
/PHP-8.4/ext/intl/common/ |
H A D | common_enum.cpp | 149 ii->iterator->index = 0; in IntlIterator_from_StringEnumeration() 159 if (ii->iterator) { in IntlIterator_objects_free() 180 if (ii->iterator == NULL) { in IntlIterator_get_iterator() 188 return ii->iterator; in IntlIterator_get_iterator() 201 intern->iterator = NULL; in IntlIterator_object_create() 214 data = ii->iterator->funcs->get_current_data(ii->iterator); in PHP_METHOD() 229 ii->iterator->funcs->get_current_key(ii->iterator, return_value); in PHP_METHOD() 242 ii->iterator->funcs->move_forward(ii->iterator); in PHP_METHOD() 245 ii->iterator->index++; in PHP_METHOD() 256 ii->iterator->funcs->rewind(ii->iterator); in PHP_METHOD() [all …]
|
/PHP-8.4/ext/spl/tests/ |
H A D | recursiveiteratoriterator_getsubiterator_variation_003.phpt | 10 $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($sample_array)); 12 $iterator->next(); 13 $iterator->next(); 14 $iterator->next(); 15 var_dump($iterator->getSubIterator(-1)); 16 var_dump($iterator->getSubIterator(0)->getArrayCopy()); 17 var_dump($iterator->getSubIterator(1)->getArrayCopy()); 18 var_dump($iterator->getSubIterator(2));
|
H A D | recursiveiteratoriterator_getsubiterator_variation.phpt | 10 $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($sample_array)); 12 $iterator->next(); 13 $iterator->next(); 14 var_dump(get_class($iterator->getSubIterator())); 15 var_dump($iterator->getSubIterator()->getArrayCopy()); 16 $iterator->next(); 17 var_dump(get_class($iterator->getSubIterator())); 18 var_dump($iterator->getSubIterator()->getArrayCopy());
|
H A D | bug77263.phpt | 19 $iterator = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS ); 21 $iterator = new Filter1( $iterator ); 23 $iterator = new Filter2( $iterator ); 25 $iterator = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::LEAVES_ONLY, Recur… 27 foreach ( $iterator as $item ) {
|
H A D | bug74519.phpt | 6 $iterator = new \AppendIterator(); 8 $iterator->append($events); 12 while($iterator->valid()) { 13 echo $iterator->current(), "\n"; 14 $iterator->next();
|
H A D | bug80724.phpt | 5 $iterator = new FilesystemIterator(__DIR__, FilesystemIterator::KEY_AS_FILENAME); 6 foreach ($iterator as $key => $value) { 10 $iterator->rewind(); 11 echo var_dump(hasSeparator($iterator->key())); 13 $iterator->setFlags(0); 14 echo var_dump(hasSeparator($iterator->key())); 16 $iterator->setFlags(FilesystemIterator::KEY_AS_FILENAME); 17 echo var_dump(hasSeparator($iterator->key()));
|
H A D | SplFixedArray_override_getIterator.phpt | 9 $iterator = parent::getIterator(); 10 while ($iterator->valid()) { 11 echo "In A: key={$iterator->key()} value={$iterator->current()}\n"; 12 yield $iterator->key() => $iterator->current(); 13 $iterator->next();
|
H A D | recursiveiteratoriterator_getsubiterator_variation_002.phpt | 10 $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($sample_array)); 12 $iterator->next(); 13 var_dump(is_null($iterator->getSubIterator())); 14 $iterator->next(); 15 var_dump(is_null($iterator->getSubIterator()));
|
H A D | bug42654_2.phpt | 7 $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($data)); 8 foreach($iterator as $foo) { 9 $key = $iterator->key(); 14 $iterator->offsetSet($key, 'alter'); 17 $copy = $iterator->getArrayCopy();
|
H A D | heap_009.phpt | 2 SPL: SplHeap and friends, throw: An iterator cannot be used with foreach by reference 49 An iterator cannot be used with foreach by reference 50 An iterator cannot be used with foreach by reference 51 An iterator cannot be used with foreach by reference 52 An iterator cannot be used with foreach by reference 53 An iterator cannot be used with foreach by reference 54 An iterator cannot be used with foreach by reference
|
H A D | recursiveiteratoriterator_getsubiterator_basic.phpt | 2 SPL: RecursiveIteratorIterator::getSubIterator() returns iterator passed in constructor 12 $iterator = new RecursiveIteratorIterator($sub_iterator); 14 var_dump($iterator->getSubIterator() === $sub_iterator); 15 var_dump($iterator->getSubIterator() === $not_sub_iterator);
|
H A D | bug42654.phpt | 12 $iterator = new RecursiveIteratorIterator(new 14 foreach($iterator as $foo) { 15 $key = $iterator->key(); 17 var_dump($iterator->getInnerIterator()); 18 $iterator->offsetSet($key, 'alter'); 19 var_dump($iterator->getInnerIterator()); 21 $copy = $iterator->getArrayCopy();
|
/PHP-8.4/ext/date/tests/ |
H A D | DatePeriod_no_advance_on_valid.phpt | 10 $iterator = $period->getIterator(); 12 foreach ($iterator as $item) { 18 foreach ($iterator as $item) { 19 $iterator->valid(); 24 $iterator = $period->getIterator(); 28 foreach ($iterator as $item) { 34 foreach ($iterator as $item) { 35 $iterator->valid();
|
/PHP-8.4/Zend/tests/ |
H A D | gc_046.phpt | 8 private $iterator; 10 $this->iterator = new ArrayIterator($this); 13 $this->iterator = new CallbackFilterIterator($this->iterator, fn() => true); 14 $this->iterator->rewind();
|
H A D | gh7958.phpt | 7 public \Iterator $iterator; 11 $this->iterator = new ArrayIterator($data); 22 $this->iterator = new \CallbackFilterIterator($this->iterator, fn() => true); 23 $this->iterator->rewind(); 30 print_r(iterator_to_array($action->iterator));
|
H A D | oss_fuzz_58181.phpt | 6 $iterator = new ArrayIterator($data); 7 $iterator = new \CallbackFilterIterator($iterator, fn&() => true); 8 $iterator->rewind();
|
H A D | bug71154.phpt | 2 Bug #71154: Incorrect HT iterator invalidation causes iterator reuse 8 /* Free array, causing free of iterator */ 10 /* Reuse the iterator.
|
H A D | gh16371.phpt | 2 GH-16371: Assertion failure in zend_weakmap_iterator_get_current_key() for invalid iterator 19 print "# Valid iterator\n"; 26 print "# End of iterator\n"; 39 # Valid iterator 44 # End of iterator
|
/PHP-8.4/ext/spl/ |
H A D | spl_iterators.stub.php | 25 public function __construct(Iterator $iterator, callable $callback) {} argument 33 public function __construct(RecursiveIterator $iterator, callable $callback) {} argument 127 public function __construct(Traversable $iterator, ?string $class = null) {} argument 153 public function __construct(Iterator $iterator) {} argument 164 public function __construct(RecursiveIterator $iterator) {} argument 175 public function __construct(RecursiveIterator $iterator) {} argument 291 public function __construct(Iterator $iterator) {} argument 314 public function append(Iterator $iterator): void {} argument 337 public function __construct(Iterator $iterator) {} argument 425 /** @param RecursiveIterator|IteratorAggregate $iterator */ [all …]
|
/PHP-8.4/ext/intl/breakiterator/ |
H A D | breakiterator_iterators.cpp | 226 ii->iterator = (zend_object_iterator*)emalloc(sizeof(zoi_break_iter_parts)); in IntlIterator_from_BreakIterator_parts() 227 zend_iterator_init(ii->iterator); in IntlIterator_from_BreakIterator_parts() 229 ZVAL_COPY(&ii->iterator->data, break_iter_zv); in IntlIterator_from_BreakIterator_parts() 230 ii->iterator->funcs = &breakiterator_parts_it_funcs; in IntlIterator_from_BreakIterator_parts() 231 ii->iterator->index = 0; in IntlIterator_from_BreakIterator_parts() 235 ZVAL_UNDEF(&((zoi_with_current*)ii->iterator)->current); in IntlIterator_from_BreakIterator_parts() 239 assert(((zoi_break_iter_parts*)ii->iterator)->bio->biter != NULL); in IntlIterator_from_BreakIterator_parts() 241 ((zoi_break_iter_parts*)ii->iterator)->key_type = key_type; in IntlIterator_from_BreakIterator_parts() 242 ((zoi_break_iter_parts*)ii->iterator)->index_right = 0; in IntlIterator_from_BreakIterator_parts() 253 RETURN_COPY_DEREF(&ii->iterator->data); in PHP_METHOD() [all …]
|