* Fetch the current item * * @param iter The iterator to retrieve the value from * @return The current value of the iterator */
| 85 | * @return The current value of the iterator |
| 86 | */ |
| 87 | zval *IteratorImpl::current(zend_object_iterator *iter) |
| 88 | { |
| 89 | // get the actual iterator |
| 90 | auto *iterator = self(iter); |
| 91 | |
| 92 | // retrieve the value (and store it in a member so that it is not |
| 93 | // destructed when the function returns) |
| 94 | auto &value = iterator->current(); |
| 95 | |
| 96 | // return the internal zval |
| 97 | return value._val; |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Fetch the key for the current element (optional, may be NULL). The key |
no test coverage detected