blue = reviewed : items with "(auto)" note are 3rd part libraries with declared php81 compatibility.
green = fixed
red = pending

===== ===== ===== =====
  . Calling key(), current(), next(), prev(), reset(), or end() on objects
    is deprecated. Instead cast the object to array first, or make use of
    ArrayIterator.
    RFC: https://wiki.php.net/rfc/deprecations_php_8_1
===== ===== ===== =====

$ rg '[^\w>:](key|current|next|prev|reset|end)\([^\)]+\)' -t php -g '!*_test.php'
(1245 matches follow)

files/classes/privacy/provider.php
140:        $context = reset($contexts);
193:        $context = reset($contexts);

media/player/videojs/classes/plugin.php
285:            $url = reset($urls);
361:            $this->language = key($candidates);

analytics/classes/calculable.php
311:            reset($base);

analytics/classes/local/time_splitting/past_periodic.php
80:        $lastrange = end($ranges);

analytics/classes/course.php
295:                $event = reset($events);
609:            return reset($values);

analytics/classes/analysis.php
787:        $rangeindex = key($ranges);
864:        $rangeindex = key($ranges);

analytics/classes/local/analysis/result_file.php
204:            'nfeatures' => count(current($data)) - 1,

media/classes/player_external.php
58:        return $this->embed_external(reset($urls), $name, $width, $height, $options);
77:        $url = reset($urls);

analytics/classes/manager.php
455:            $logstore = reset($readers);
457:            $logstore = reset($readers);

media/classes/player.php
196:        $url = reset($urls);

analytics/classes/model.php
834:            // Same as reset($indicatorcalculations) as models based on assumptions only analyse 1 single
1898:        $firstprediction = reset($predictionrecords);

media/player/youtube/classes/plugin.php
46:            $url = reset($urls);
86:            $videoid = end($this->matches);

mod/page/mod_form.php
68:            reset($options);
69:            $mform->setDefault('display', key($options));

mod/bigbluebuttonbn/bbb_view.php
115:        $lastaccess = end($accesses);

mod/lti/servicelib.php
304:        $callback = current($plugins);

mod/data/classes/local/importer/preset_importer.php
142:            $presettofind = end($explodeddirectory);

mod/data/locallib.php
750:        $reason = current(array_keys($warnings));
1427:        $val = reset($vals);

mod/lti/service/gradebookservices/classes/local/service/gradebookservices.php
168:                $item = reset($coupledlineitems);
221:                            $id = reset($lineitemsgbs)->gradeitemid;
224:                            $coupledid = reset($coupledlineitems)->id;

mod/data/lib.php
1258:        $grade = reset($grades->items[0]->grades);
1307:        $grade = reset($grades->items[0]->grades);
2430:            $presettofind = end($explodeddirectory);

mod/bigbluebuttonbn/classes/test/testcase_helper_trait.php
317:                    $data = end($data);

mod/bigbluebuttonbn/classes/local/helpers/files.php
124:            $file = reset($files);
191:            $file = reset($files);

mod/survey/tests/generator/lib.php
69:            reset($this->templates);
70:            $record['template'] = key($this->templates);

mod/resource/lib.php
228:        $mainfile = reset($files);

mod/resource/view.php
73:    $file = reset($files);

mod/resource/locallib.php
278:        $mainfile = $files ? reset($files) : null;
522:        $file = reset($files);

mod/resource/mod_form.php
90:            reset($options);
91:            $mform->setDefault('display', key($options));
224:                $file = reset($files);

mod/lesson/view.php
136:        $timer = current($timers);

mod/scorm/aicc.php
219:                        reset($datarows);
309:                                    while ((($datarow = current($datarows)) !== false) && (substr($datarow, 0, 1) != '[')) {
311:                                        next($datarows);

mod/forum/externallib.php
2170:        $post = empty($posts) ? array() : reset($posts);

mod/scorm/lib.php
145:            $file = reset($files);
228:            $file = reset($files);
359:        $grade = reset($grades->items[0]->grades);
405:        $grade = reset($grades->items[0]->grades);
992:        $file = reset($files);
1177:    $file = reset($files);

mod/scorm/locallib.php
1058:            $sco = current($scoes);
2112:                $sco = reset($scoes); // Get first item from the list.
2178:        $reason = current(array_keys($warnings));
2206:                    $sco = current($scoes);
2220:        $sco = current($scoes);

mod/assign/externallib.php
1980:            $criteria = reset($params['advancedgradingdata']);
2128:                $criteria = reset($gradeinfo['advancedgradingdata']);

mod/assign/backup/moodle2/restore_assign_stepslib.php
334:                $submission = reset($submissions);
351:                $submission = reset($submissions);

mod/scorm/player.php
127:    $reason = current(array_keys($warnings));

mod/scorm/report.php
46:    $mode = reset($reportlist);

mod/glossary/lib.php
256:        $grade = reset($grades->items[0]->grades);
324:        $grade = reset($grades->items[0]->grades);

mod/scorm/datamodels/scormlib.php
740:            $sco = reset($scoes); // We only care about the first record - the above query only returns one.
750:            $sco = reset($scoes); // We only care about the first record - the above query only returns one.

mod/scorm/backup/moodle2/restore_scorm_stepslib.php
217:                $sco = reset($scoes); // We only care about the first record - the above query only returns one.

mod/lesson/report.php
80:                        $timer = reset($timers);
91:                        $grade = reset($grades);

mod/assign/feedback/file/importziplib.php
142:                    $content = reset($file);

mod/assign/feedback/editpdf/fpdi/PdfParser/Filter/AsciiHex.php
44:        return \current($t)

mod/assign/feedback/editpdf/fpdi/PdfParser/CrossReference/FixedReader.php
185:        $subSection = \current($subSections);

mod/assign/feedback/editpdf/fpdi/PdfParser/StreamReader.php
404:    public function reset($pos = 0, $length = 200)

mod/assign/feedback/offline/locallib.php
109:        $file = reset($files);

mod/assign/feedback/editpdf/classes/document_services.php
220:                        $file = reset($file);
540:            $first = reset($files);
840:            return reset($files);

mod/scorm/datamodels/aicclib.php
387:        $sco = reset($scoes); // We only care about the first record - the above query only returns one.

mod/lesson/lib.php
388:        $grade = reset($grades->items[0]->grades);
400:                $attempt = reset($attempts);
445:        $grade = reset($grades->items[0]->grades);
692:                $currentgrade = reset($grades);
701:            $params['grademax']   = reset($grade->items)->grademax;
1271:        $file = reset($files);

mod/forum/lib.php
410:        $grade = reset($grades->items[0]->grades);
421:        $grade = reset($grades->items[1]->grades);
475:        $grade = reset($grades);
976:    $post = &$posts[reset($posts)->id];
985:            $post = &$posts[end($post->children)->id];
4970:        $lastpost = reset($lastposts);

mod/scorm/renderer.php
196:            $lastattempt = end($this->attemptids); // Get last attempt.
197:            $firstattempt = reset($this->attemptids); // get first attempt.

mod/assign/locallib.php
3133:            $submission = reset($submissions);
3170:                    $latestsubmission = reset($result);
3776:            $submission = reset($submissions);
3814:                    $latestsubmission = reset($result);
3925:            return reset($grades);
4848:            $PAGE->blocks->add_fake_block($bc, reset($regions));

mod/assign/classes/downloader.php
262:                $content = reset($file);

mod/forum/classes/local/vaults/discussion_list.php
282:                    $returnfield = reset($availablefields);

mod/forum/classes/local/renderers/discussion_list.php
243:        $firstdiscussion = reset($discussions);

mod/assign/classes/output/grading_app.php
75:            $this->userid = reset($this->participants)->id;

mod/scorm/mod_form.php
307:        $coursescorm = current($scorms);
381:                $file = reset($files);

mod/lesson/essay.php
140:            $grade = current($grades);
238:                $grade  = current($grades);

mod/h5pactivity/view.php
56:$file = reset($files);

mod/h5pactivity/lib.php
520:    $file = reset($files);

mod/lesson/locallib.php
155:            $temp = end($pagesinbranch);
321:            $page = lesson_page::load($pages[end($attempts)->pageid], $lesson);
323:                $attempt = end($attempts);
339:                $attempt = end($attempts); // doesn't matter which one
427:        $firstregion = reset($regions);
1217:            $userstats->grade = current($grades);
1226:            $userstats->timetotake = current($times);
2239:        $timer = current($timer); // This will get the latest start time record.
2607:            if (end($clusterpages)->nextpageid == 0) {
2739:        reset($pageidsref);
2741:        $next = next($pageidsref);
2758:            $next = next($pageidsref);
2997:            $attempt = end($allattempts);
3020:            $lastbranchtable = current($branchtables);
3317:                $attempt = end($attempts);
3631:                        $grade = reset($grades->items[0]->grades);
3671:                $firstattempt = current($attempts);
3675:                $lastattempt = end($attempts);
3703:            $lastattempt = end($attempts);

mod/lesson/pagetypes/matching.php
124:                is_array(reset($properties->response_editor))) {  // And they come split into text & format array.

mod/lesson/pagetypes/numerical.php
88:            $wrongresponse = end($properties->response_editor);
89:            $wrongkey = key($properties->response_editor);
107:            $wrongresponse = end($properties->response_editor);
108:            $wrongkey = key($properties->response_editor);
170:            $lastanswer = end($answers);
173:                $otheranswers = end($answers);
270:            } else if ($useranswer != null && ($answer->id == $useranswer->answerid || ($answer == end($answers) &&

mod/lesson/pagetypes/shortanswer.php
85:            $wrongresponse = end($properties->response_editor);
86:            $wrongkey = key($properties->response_editor);
104:            $wrongresponse = end($properties->response_editor);
105:            $wrongkey = key($properties->response_editor);
221:            $lastanswer = end($answers);
224:                $otheranswers = end($answers);
335:            } else if ($useranswer != null && ($answer->id == $useranswer->answerid || $answer == end($answers))) {

mod/book/tool/importhtml/import_form.php
74:            $file = reset($files);

mod/book/tool/importhtml/index.php
81:    $file = reset($files);

mod/book/tool/importhtml/locallib.php
56:        $chapterfile = reset($chapterfiles);
324:                $htmlfile = reset($htmlfiles);
337:                $htmlfile = reset($tophtmlfiles);
340:            $htmlfile = reset($subhtmlfiles);

mod/lesson/classes/external.php
229:                throw new moodle_exception(key($error), 'lesson', '', current($error));
231:            $errors[key($error)] = current($error);
238:                throw new moodle_exception(key($error), 'lesson', '', current($error));
240:            $errors[key($error)] = current($error);
248:                throw new moodle_exception(key($error), 'lesson', '', current($error));
250:            $errors[key($error)] = current($error);
263:                    throw new moodle_exception(key($error), 'lesson');
265:                $errors[key($error)] = current($error);
277:                        throw new moodle_exception(key($error), 'lesson');
279:                    $errors[key($error)] = current($error);
285:                    throw new moodle_exception(key($error), 'lesson');
287:                $errors[key($error)] = current($error);
293:                    throw new moodle_exception(key($error), 'lesson');
295:                $errors[key($error)] = current($error);
297:                $timer = current($timers);
301:                        throw new moodle_exception(key($error), 'lesson');
303:                    $errors[key($error)] = current($error);
314:                                $lastattempt = end($attempts);
319:                                $lastattempt = end($attempts);
328:                            throw new moodle_exception(key($error), 'lesson');
330:                        $errors[key($error)] = current($error);
1625:            reset($validation);
1626:            throw new moodle_exception(key($validation), 'lesson', '', current($validation));   // Throw first error.

mod/h5pactivity/mod_form.php
89:                $file = reset($files);
181:            $file = reset($files);

mod/h5pactivity/classes/output/result/choice.php
48:        $correctpattern = reset($this->correctpattern);
70:                $correctpattern = explode(',', reset($correctpattern));

mod/h5pactivity/classes/output/result/matching.php
47:        $correctpattern = reset($this->correctpattern);

mod/h5pactivity/classes/output/result/truefalse.php
48:        $correctpattern = reset($this->correctpattern);
49:        $correctpattern = filter_var(reset($correctpattern), FILTER_VALIDATE_BOOLEAN);
52:        $response = filter_var(reset($this->response), FILTER_VALIDATE_BOOLEAN);

mod/h5pactivity/classes/output/result/longfillin.php
49:        $userresponse = reset($this->response);

mod/h5pactivity/classes/output/result/sequencing.php
47:        $correctpattern = reset($this->correctpattern);

mod/h5pactivity/tests/external/log_report_viewed.php
97:        $event = end($events);

mod/quiz/summary.php
95:$PAGE->blocks->add_fake_block($navbc, reset($regions));

mod/quiz/attempt.php
131:$PAGE->blocks->add_fake_block($navbc, reset($regions));

mod/quiz/report.php
76:    $url->param('mode', reset($reportlist));

mod/quiz/tests/generator/lib.php
129:            $attempt = end($attempts);

mod/quiz/tests/behat/behat_mod_quiz.php
925:        $quizgenerator->submit_responses(key($attempts), $responses, false, false);
962:        $quizgenerator->submit_responses(key($attempts), $responses, true, false);
983:        $attemptobj = quiz_attempt::create(key($attempts));

mod/quiz/lib.php
498:        $grade = reset($grades->items[0]->grades);
532:        $grade = reset($grades->items[0]->grades);
1800:                ['id' => $settings->get_page()->cm->id, 'mode' => reset($reportlist)]);

mod/quiz/accessrule/seb/classes/settings_provider.php
683:        return reset($files);
701:        return reset($files);

mod/quiz/accessrule/seb/classes/local/form/template.php
84:                $file = reset($files);

mod/quiz/view.php
90:$lastfinishedattempt = end($attempts);

mod/quiz/report/overview/report.php
447:        $latestversion = reset($versionsoptions);

mod/quiz/report/reportlib.php
397:    return reset($reports);

mod/wiki/create_form.php
78:                $groupid = key($groupinfo);

mod/quiz/locallib.php
815:            $firstattempt = reset($attempts);
819:            $lastattempt = end($attempts);
2177:        $lastslot = end($slots);
2385:    $lastattempt = end($attempts);

mod/quiz/grade.php
61:            $attempt = reset($attempts);
66:            $attempt = end($attempts);
95:        'id' => $cm->id, 'mode' => reset($reportlist)]));

mod/quiz/review.php
266:$PAGE->blocks->add_fake_block($navbc, reset($regions));

mod/wiki/parser/parser.php
183:        $rule = end($this->rulestack);
251:        $rule = end($this->rulestack);

mod/quiz/classes/completion/custom_completion.php
70:        $lastfinishedattempt = end($attempts);

mod/wiki/pagelib.php
1312:        if (end($versions)->version == 0) {
2677:        if (end($versions)->version == 0) {

mod/quiz/classes/quiz_attempt.php
220:        if (end($pagelayouts) == '') {
1613:            if (is_int(key($simulatedresponses))) {
1900:            if ($slot == reset($this->pagelayout[$page]) && $thispage != $page) {

mod/quiz/classes/structure.php
472:        end($this->slotsinorder);
473:        return $slotnumber == key($this->slotsinorder);
493:        return $section->id == end($this->sections)->id;
512:        return end($this->slotsinorder);
795:        $latestversion = reset($versions);
1267:        $firstslot = end($slotsonpage);

mod/quiz/classes/local/structure/slot_random.php
187:            $lastslot = end($slots);

mod/quiz/classes/question/bank/qbank_helper.php
241:        $slotdata = reset($slotdata);

mod/quiz/classes/external.php
1907:        $lastfinishedattempt = end($attempts);

mod/quiz/deprecatedlib.php
73:    $lastfinishedattempt = end($attempts);

mod/wiki/diff/difflib.php
244:    end($V);
245:    $max=key($V)+1;

mod/wiki/classes/privacy/provider.php
204:        $subwikiid = key($subwiki);

mod/choice/view.php
81:        $reason = current(array_keys($warnings));

mod/feedback/tests/behat/behat_mod_feedback.php
197:        $itemactual = reset($dataactual);
226:            $itemactual = next($dataactual);

mod/url/mod_form.php
67:            reset($options);
68:            $mform->setDefault('display', key($options));

mod/choice/classes/external.php
354:                $params['responses'] = reset($params['responses']);

mod/imscp/lib.php
124:            $package = reset($files);
177:        $package = reset($files);

mod/workshop/lib.php
412:        $submissiongrade = reset($grades->items[0]->grades);
423:        $assessmentgrade = reset($grades->items[1]->grades);
461:        $submissiongrade = reset($grades->items[0]->grades);
470:        $assessmentgrade = reset($grades->items[1]->grades);

mod/workshop/eval/best/lib.php
332:        $first = reset($assessments);

mod/workshop/form/rubric/backup/moodle1/lib.php
93:        $firstelement = reset($this->elements);

mod/workshop/locallib.php
2585:                $submissiongrade = reset($gradebook->items[0]->grades);
2596:                $assessmentgrade = reset($gradebook->items[1]->grades);

mod/workshop/allocation/random/lib.php
129:                $reviewerid = key($newallocation);
130:                $authorid = current($newallocation);
332:            $reviewerid = key($newallocation);
333:            $authorid = current($newallocation);
376:            $authorid = reset($newallocation);
417:                $nrid = key($newallocation);
418:                $naid = current($newallocation);

mod/workshop/assessment.php
133:            $next = reset($pending);

mod/workshop/tests/generator/lib.php
71:            reset($gradecategories);
72:            $defaultcategory = key($gradecategories);

mod/imscp/locallib.php
42:    $first = reset($items);

mod/imscp/mod_form.php
96:            $file = reset($files);

mod/folder/lib.php
380:    $file = reset($files);

mod/label/lib.php
251:        if ($file = reset($files)) {

theme/boost/classes/boostnavbar.php
229:        $item = end($this->items);
231:        reset($this->items);

h5p/libraries.php
92:    $file = reset($files);

tag/edit.php
52:            $tag = reset($tags);

h5p/classes/api.php
713:        $file = reset($files);

badges/criteria/award_criteria_course.php
104:        $param = reset($this->params);
131:            $param = reset($this->params);
230:        $coursecriteria = reset($this->params);

h5p/classes/framework.php
507:        if (!$library = reset($libraries)) {
670:            $library = reset($libraries);
1775:            return reset($libraries);

theme/classic/tests/behat/behat_theme_classic_behat_navigation.php
139:        $nodetext = end($nodes);
404:            $lastnode = end($nodelist);

badges/classes/badge.php
894:            $c = reset($this->criteria);

badges/classes/output/base_action_bar.php
81:                $link = key($result);
82:                $text = current($result);

h5p/h5plib/v124/joubel/core/h5p.classes.php
1409:        if (is_array(current($h5pData))) {

badges/renderer.php
695:            $c = reset($badge->criteria);

tag/classes/external.php
395:                    $tag = reset($tags);

tag/classes/index_builder.php
188:            $firstitem = reset($this->items);
190:            $this->idfield = key($firstitemarray);

tag/classes/tag.php
253:                $tag = reset($tags);
907:            $tag = reset($tags);

dataformat/pdf/classes/writer.php
158:        end($record);
159:        $lastkey = key($record);
162:        reset($record);

tag/index.php
57:            $tag = reset($tags);

tag/classes/area.php
48:            $defaultcoll = reset($colls);
162:                $component = key($itemtypes[$itemtype]);
180:                $component = key($itemtypes[$itemtype]);

backup/moodle2/restore_plan_builder.class.php
110:                self::build_activity_plan($controller, key($controller->get_info()->activities));
113:                self::build_section_plan($controller, key($controller->get_info()->sections));

report/outline/tests/behat/behat_report_outline.php
46:        $reader = reset($readers);
62:        $logentry = reset($logentries);

backup/moodle2/restore_stepslib.php
2350:                $instance = reset($instances);
4309:                $newcontext = context_block::instance(reset($existingblock)->id);
5699:                $repoid = reset($repoids);

report/eventlist/eventdetail.php
50:$filename = end($component);

report/backups/index.php
61:        $backup = reset($backups);

report/log/locallib.php
57:        $reader = reset($readers);
111:        $reader = reset($readers);
163:        $reader = reset($readers);

report/log/classes/renderable.php
127:                reset($readers);
128:                $logreader = key($readers);

report/log/classes/renderer.php
190:                $attributes = array('type' => 'hidden', 'name' => 'logreader', 'value' => key($readers));

report/insights/insights.php
71:    $model = reset($othermodels);
154:        $prediction = reset($predictions);

report/insights/classes/output/actions_exporter.php
104:        $predictionvalue = reset($predictions)->get_prediction_data()->prediction;

report/loglive/classes/renderable.php
93:                reset($readers);
94:                $logreader = key($readers);

availability/classes/tree.php
511:            $child = reset($children);

backup/cc/cc_lib/cc_asssesment.php
245:                    $ns = key($value);
246:                    $nval = current($value);
2625:        reset($this->correct_feedbacks);
2626:        $ident = key($this->correct_feedbacks);
2641:        reset($this->incorrect_feedbacks);
2642:        $ident = key($this->incorrect_feedbacks);

backup/cc/cc_lib/gral_lib/parser.php
38:    $extension      = end(explode('.',$fname));

backup/tests/backup_restore_base_testcase.php
67:        $backupfile = reset($files);

lib/clilib.php
106:                $key   = reset($parts);
129:                $key   = reset($parts);

lib/datalib.php
869:        $defaultcat = reset($topcats);
891:        $defaultcat = reset($topcats);
900:        $frontcourse = reset($frontcourses);
1826:        reset($nontrivialmap);
1827:        $current = $cyclestart = key($nontrivialmap);

lib/completionlib.php
787:            return self::internal_get_grade_state($item, reset($grades));

lib/adodb/adodb-datadict.inc.php
551:			$first  = current($lines);

lib/blocklib.php
876:        $lastcurrentblock = end($this->birecordsbyregion[$defaulregion]);
908:                $pagetypepattern = key($pagetypelist);
1215:            $first = reset($instances);

lib/outputcomponents.php
120:                    $file = reset($files);
1238:            $nothingvalue = reset($this->nothing);
1240:                $nothing = [key($this->nothing) => get_string('choosedots')];
1245:            $nothingkey = key($this->nothing);
1493:            $value = key($nothing);
1494:            $name = reset($nothing);
1544:            $nothingvalue = reset($this->nothing);
1546:                $nothing = [key($this->nothing) => get_string('choosedots')];
1989:                $output .= self::select_optgroup(key($label), current($label), $selected);
2267:            $lastkey = end($keys);
2325:            $lastrowkey = end($keys);
2361:                    $lastkey = end($keys2);

lib/adodb/drivers/adodb-ado5.inc.php
620:		$t = reset($this->_tarr);
621:		$f = reset($this->_flds);
680:			$f = next($this->_flds);
681:			$t = next($this->_tarr);

lib/gradelib.php
85:        $gradeitem = reset($gradeitems);
247:            $grade       = reset($grades);

lib/scssphp/Compiler.php (auto)
889:        if (\count($selector) == 1 && \in_array(reset($selector), $partsPile)) {
945:                        if (! $this->isImmediateRelationshipCombinator(end($slice))) {
1041:        if (\count($out) && \count($extended) === 1 && \count(reset($extended)) === 1) {
1042:            $single = reset($extended);
1043:            $part = reset($single);
1049:                $prev = end($out);
1052:                if (\count($prev) === 1 && \count(reset($prev)) === 1) {
1053:                    $single = reset($prev);
1054:                    $part = reset($single);
1173:                $replacement = end($new);
1221:            $slice    = end($parents);
1248:        while (\count($other) && strpos(end($other), ':') === 0) {
1535:                $scope = end($scope->children);
1726:                $s = reset($block->selectors);
1729:                    $s = reset($s);
2208:            if (\is_array(end($joined))) {
2432:                $queryString = reset($queryString);
2593:        $part1 = end($selectors1);
2594:        $part2 = end($selectors2);
2607:                if ($this->isImmediateRelationshipCombinator(reset($merged)[0])) {
6283:        $libName = (is_array($function) ? end($function) : null);
6380:            if (\is_array($args) && \count($args) && \end($args) === static::$null) {
6413:        if (! \is_array(reset($prototypes))) {
6701:        if (\count($args) && end($args) === static::$null) {
7067:            if ($removeTrailingNull && end($item[2]) === static::$null) {
7512:        $last = end($args);
9662:            if (end($value[2]) === static::$null) {
9832:        $super = reset($super);
9833:        $sub = reset($sub);
9907:        $args = reset($args);
10037:            $this->pushExtends(reset($es), $extender, null);
10067:        $args = reset($args);
10103:        $selectors = reset($args);
10122:        $compound1 = reset($selectors1);
10123:        $compound2 = reset($selectors2);
10164:            $part1 = end($compound1);
10165:            $part2 = end($compound2);
10390:        $selector = reset($args);
10394:        $selector = reset($selector);
10397:        $part = reset($selector);

lib/moodlelib.php
4335:                $user = reset($users);
9377:            $address = end($forwardedaddresses);
9725:            $first = key($details['stores']);

lib/htmlpurifier/HTMLPurifier/Printer.php (auto)
63:    protected function end($tag)

lib/htmlpurifier/HTMLPurifier/Zipper.php (auto)
61:    public function next($t) {
84:    public function prev($t) {

lib/htmlpurifier/HTMLPurifier/Lexer/DOMLex.php (auto)
196:            $last = end($tokens);

lib/htmlpurifier/HTMLPurifier/PropertyList.php (auto)
76:    public function reset($name = null)

lib/php-css-parser/OutputFormatter.php
34:                $sSpaceString = reset($sSpaceString);

lib/htmlpurifier/HTMLPurifier/Lexer/PH5P.php (auto)
730:        $the_same = count($this->tree->stack) > 0 && $next_node === end($this->tree->stack)->nodeName;
1992:                    end($this->stack)->nodeName,
2074:            if ($this->head_pointer->isSameNode(end($this->stack))) {
2095:            if ($this->head_pointer->isSameNode(end($this->stack))) {
2604:                            : end($this->stack)->appendChild($element);
2813:                        } elseif (end($this->stack)->nodeName !== 'body') {
2886:                        if (end($this->stack)->nodeName !== $token['name']) {
3240:                            $marker = end(array_keys($this->a_formatting, self::MARKER, true));
3279:                            $node = end($this->stack);
3328:            end($this->stack)->appendChild($text);
3335:            end($this->stack)->appendChild($comment);
3447:                    $current = end($this->stack)->nodeName;
3489:                end($this->stack)->nodeName,
3550:                    $node = end($this->stack)->nodeName;
3633:            end($this->stack)->appendChild($text);
3640:            end($this->stack)->appendChild($comment);
3655:            if (end($this->stack)->nodeName === 'html') {
3760:                        'name' => end($this->stack)->nodeName,
3907:                    $node = end($this->stack)->nodeName;
4042:            if (end($this->stack)->nodeName === 'option') {
4060:            if (end($this->stack)->nodeName === 'option') {
4071:            if (end($this->stack)->nodeName === 'optgroup') {
4118:            if (end($this->stack)->nodeName === 'option') {
4137:                    $current = end($this->stack)->nodeName;
4274:            if (end($this->stack)->nodeName === 'html') {
4438:            end($this->stack)->appendChild($node);
4538:        $entry = end($this->a_formatting);
4581:            end($this->stack)->appendChild($clone);
4590:            if (end($this->a_formatting) !== $clone) {
4607:            $entry = end($this->a_formatting);
4627:        $node = end($this->stack);
4630:        while (in_array(end($this->stack)->nodeName, $elements)) {
4657:            $node = end($this->stack)->nodeName;

lib/scssphp/Formatter/Nested.php (auto)
104:        while ($block->depth < end($depths) || ($block->depth == 1 && end($depths) == 1)) {
127:            if ($block->depth > end($depths)) {

lib/ajax/blocks.php
93:                $last = end($instances);
100:            $first = reset($instances);

lib/php-css-parser/RuleSet/DeclarationBlock.php
60:                if (in_array($oParserState->peek(), ['\'', '"']) && substr(end($aSelectorParts), -1) != "\\") {

lib/adodb/drivers/adodb-pdo_firebird.inc.php
262:			$this->genID = (integer)reset($rs->fields);

lib/scssphp/Parser.php (auto)
669:                    $cond = reset($cond[2]);
720:                    $cond = reset($cond[2]);
847:                if (count($dirName) === 1 && is_string(reset($dirName))) {
848:                    $dirName = reset($dirName);
877:                if (\count($dirName) === 1 && \is_string(\reset($dirName))) {
878:                    $dirName = \reset($dirName);
2039:        if (\is_array($directiveName) && \is_string(reset($directiveName))) {
2040:            $directiveName = reset($directiveName);
2683:            if (strlen(reset($unicode)) <= 6 && strlen(end($unicode)) <= 6) {
3293:        if ($rtrim && \is_string(end($content))) {
3294:            $content[\count($content) - 1] = rtrim(end($content));
3735:                            ($this->selectors($subs, reset($nameParts)) || true) &&
3746:                                    if (\count($sub) && reset($sub)) {
3751:                                if (\count($subs) && reset($subs)) {
4026:    protected function end($eatWhitespace = null)
4057:                $node     = end($token[2]);
4077:        $selector = end($selectors);
4078:        $part     = end($selector);

lib/adodb/drivers/adodb-mssqlnative.inc.php
129:		$version = (int)reset($matches);

lib/upgradelib.php
2350:        $charset = reset($collationinfo);
2375:        $charset = reset($collationinfo);
2400:        $charset = reset($collationinfo);
2425:        $charset = reset($collationinfo);
2516:    if (key($data) === 0) {

lib/adodb/drivers/adodb-ibase.inc.php
292:			$this->genID = (integer) reset($rs->fields);

lib/adodb/drivers/adodb-firebird.inc.php
430:			$this->genID = (integer) reset($rs->fields);

lib/adodb/drivers/adodb-ado.inc.php
576:		$t = reset($this->_tarr);
577:		$f = reset($this->_flds);
632:			$f = next($this->_flds);
633:			$t = next($this->_tarr);

lib/enrollib.php
1219:    $instance = reset($instances);

lib/openspout/src/Reader/Wrapper/XMLReader.php
108:    public function next($localName = null)

lib/formslib.php
561:            $key = key($nameparsed);
768:            reset($_FILES);
769:            $elname = key($_FILES);
789:            $file = reset($files);
837:            $file = reset($files);
944:            $file = reset($files);
1006:            $file = reset($files);

lib/adodb/drivers/adodb-text.inc.php (skipped)
164:			reset($this->_origarray);
202:				reset($this->_colnames);
256:			reset($projnames);

lib/adodb/drivers/adodb-oci8.inc.php
189:			return $this->UnixTimeStamp(reset($rs->fields));
1002:			$element0 = reset($inputarr);
1003:			$array2d =  $this->bulkBind && is_array($element0) && !is_object(reset($element0));
1503:				$a[] = reset($v);

lib/db/upgradelib.php
651:        set_config('sitedefaultlicense', reset($activelicenses));

lib/adodb/drivers/adodb-mysqli.inc.php
307:			else $ret = reset($rs->fields);

lib/phpxmlrpc/Encoder.php (auto)
70:                    $val = reset($xmlrpcVal->me);
71:                    $typ = key($xmlrpcVal->me);

lib/phpxmlrpc/Value.php (auto)
372:        $val = reset($this->me);
373:        $typ = key($this->me);
421:        reset($this->me['struct']);
446:        $b = reset($this->me);
460:        reset($this->me);
461:        $a = key($this->me);
591:                reset($this->me);
592:                $type = key($this->me);
664:                $value = reset($this->me);
665:                $type = key($this->me);

lib/filebrowser/file_info_stored.php
143:                    $firstinstance = reset($instances);

lib/phpxmlrpc/Helper/XMLParser.php (auto)
210:                $parent = end($this->_xh['stack']);

lib/navigationlib.php
2020:            $category = reset($categories);
2308:            $activity = reset($activities);
3774:        $last = reset($items);

lib/adodb/drivers/adodb-pdo.inc.php
127:			return $this->UnixTimeStamp(reset($rs->fields));

lib/pagelib.php
532:            return reset($this->_categories);
1952:                $catid = reset($catids);
2053:        if (!is_null(end($this->_categories))) {

lib/google/src/Google/Collection.php
20:      reset($this->modelData[$this->collection_key]);
29:      return current($this->modelData[$this->collection_key]);
39:      return key($this->modelData[$this->collection_key]);
46:    next($this->modelData[$this->collection_key]);

lib/google/src/Google/Service/GamesManagement.php
359:  public function reset($achievementId, $optParams = array())
480:  public function reset($eventId, $optParams = array())
616:  public function reset($questId, $optParams = array())
699:  public function reset($optParams = array())
741:  public function reset($leaderboardId, $optParams = array())
825:  public function reset($optParams = array())

lib/google/src/Google/Utils/URITemplate.php
281:      reset($data);
282:      if (key($data) !== 0) {

lib/phpunit/classes/base_testcase.php
110:                'Unknown key(s): ' . implode(', ', $unknown)

lib/phpunit/classes/phpunit_dataset.php
155:            $firstrow = reset($rows);

lib/testing/generator/data_generator.php
939:        $instance = reset($instances);

lib/phpunit/classes/advanced_testcase.php
337:        $debug = reset($debugging);

lib/phpunit/classes/database_driver_testcase.php
203:        $debug = reset($debugging);

lib/testing/classes/util.php
441:            $lastrecord = end($records);
562:                    $lastrecord = end($records);
739:                        $lastrecord = end($records);

lib/google/src/Google/Service/Compute.php
6464:  public function reset($project, $zone, $instance, $optParams = array())

lib/grade/grade_object.php
165:            return reset($instances);

lib/adminlib.php
10640:            $file = reset($files);

lib/mustache/src/Mustache/Context.php
79:        return end($this->stack);

lib/grade/grade_category.php
192:            return reset($records);
1042:                $agg_grade = reset($grade_values);
1051:                $weights[reset($itemids)] = 1;
1063:                $weights[end($itemids)] = 1;
1064:                $agg_grade = end($grade_values);
1086:                $top = reset($freq);               // highest frequency count
1089:                $agg_grade = reset($modes);
1685:        reset($children);
2273:            $grade_item = reset($grade_items);
2278:            $grade_item = reset($grade_items);

lib/adodb/adodb-xmlschema03.inc.php
587:						$key = key( $opt );
604:			logMsg( end( $sql ), 'Generated createTableSQL' );
969:						$field_id = reset($keys);

lib/mustache/src/Mustache/Parser.php
214:            if ($prev = end($nodes)) {
221:        if ($next = reset($tokens)) {

lib/adodb/perf/perf-mssqlnative.inc.php
92:					$sql = reset($row);

lib/grouplib.php
612:        $groupname = reset($groupsmenu);
714:            $activegroup = key($groupsmenu); // Force set to one of accessible groups.
723:        $groupname = reset($groupsmenu);
810:        $groupname = reset($groupsmenu);
1214:                $firstgroup = reset($mygroups);
1216:                $firstgroup = reset($allowedgroups);

lib/adodb/perf/perf-postgres.inc.php
137:					$sql = reset($row);
149:				$s .= reset($rs->fields)."\n";

lib/behat/lib.php
482:            $behatrunprocess = reset($match);
492:                $behatconfig = str_replace("\\", "/", reset($config));

lib/bennu/iCalendar_rfc2445.php
428:            reset($vars);
429:            if(key($vars) != 'FREQ') {

lib/behat/classes/behat_session_trait.php
93:        return count($items) ? reset($items) : null;

lib/behat/form_field/behat_form_availability.php
84:                    $node = reset($nodes);

lib/adodb/perf/perf-db2.inc.php
79:					$sql = reset($row);

lib/adodb/perf/perf-mysql.inc.php
106:					$sql = reset($row);

lib/adodb/perf/perf-mssql.inc.php
92:					$sql = reset($row);

lib/adodb/perf/perf-oci8.inc.php
422:					$sql = reset($row);

lib/adodb/adodb-error.inc.php
125:	reset($error_regexps);

lib/adodb/tohtml.inc.php
90:			if ($i===0) $v=($numoffset) ? $rs->fields[0] : reset($rs->fields);
91:			else $v = ($numoffset) ? $rs->fields[$i] : next($rs->fields);

lib/adodb/adodb-perf.inc.php
123:			if (is_array(reset($inputarr))) $params = 'Array sizeof='.sizeof($inputarr);
631:					$keyf = reset($rs->fields);

lib/adodb/adodb-xmlschema.inc.php
534:						$key = key( $opt );
535:						$value = $opt[key( $opt )];
548:			logMsg( end( $sql ), 'Generated CreateTableSQL' );
899:						$field_id = reset($keys);

lib/filestorage/tgz_packer.php
246:                    $size = (int)strlen(reset($file));
288:                    $data = reset($file);

lib/maxmind/GeoIp2/Model/City.php
109:            end($this->subdivisions);

lib/tests/event_course_module_viewed.php
58:        $event = reset($result);

lib/adodb/adodb-active-record.inc.php
149:			end($_ADODB_ACTIVE_DBS);
150:			$this->_dbat = key($_ADODB_ACTIVE_DBS);
347:					$key = reset($table->keys);
359:			$key = reset($table->keys);
449:		$fld = reset($cols);
682:		reset($keys);
685:			$value = $row[current($keys)];
688:			next($keys);
908:				$k = reset($table->keys);
1029:					$k = reset($table->keys);

lib/tests/event_course_module_instance_list_viewed.php
52:        $event = reset($result);

lib/horde/framework/Horde/Mail/Mbox/Parse.php
239:        return key($this->_parsed);
246:            next($this->_parsed);
253:        reset($this->_parsed);

lib/maxmind/MaxMind/Db/Reader/Decoder.php
372:        return $testint === current(unpack('v', $packed));

lib/horde/framework/Horde/Domhtml.php
275:        $curr = end($this->_iterator);

lib/horde/framework/Horde/Array.php
42:            $keys = array_keys(reset($array));

lib/tests/behat/behat_navigation.php
444:        $nodetext = end($nodes);
469:        $nodetext = end($nodes);
1216:            $lastnode = end($nodelist);

lib/horde/framework/Horde/Stream.php
568:    public function end($offset = 0)

lib/horde/framework/Horde/Mime/Part.php
1038:                        $parts_close[] = end($parts);
2356:        reset($this->_parts);
2357:        $this->_temp['iterate'] = key($this->_parts);

lib/horde/framework/Horde/Imap/Client/Socket/ClientSort.php
144:            $tsort[$key] = reset($sorted[$key]);

lib/horde/framework/Horde/Imap/Client/Ids.php
108:            return end($this->_ids);
112:            return reset($this->_ids);
396:            ? current($this->_ids)
406:            ? key($this->_ids)
416:            next($this->_ids);
426:            reset($this->_ids);

lib/horde/framework/Horde/Imap/Client/Fetch/Results.php
117:            ? reset($this->_data)

lib/horde/framework/Horde/Imap/Client/Socket/Pop3.php
550:            ? array('implementation' => reset($id))
680:        if ((count($mboxes) > 1) || (reset($mboxes) != 'INBOX')) {
772:            : reset($options['sort']);

lib/horde/framework/Horde/Imap/Client/Data/Thread.php
89:                reset($v);
92:                $ob->base = (count($v) > 1) ? key($v) : null;
98:                while (($v2 = current($v)) !== false) {
99:                    $k2 = key($v);
109:                    next($v);
137:            reset($v);
140:            $ob->base = (count($v) > 1) ? key($v) : null;
146:            while (($v2 = current($v)) !== false) {
147:                $k2 = key($v);
157:                next($v);

lib/horde/framework/Horde/Imap/Client/Socket.php
1104:            $this->_setInit('lang', reset($lang_list));
2340:                        $server_seq_sort = (reset($options['sort']) == Horde_Imap_Client::SORT_REVERSE);
2527:                if (reset($options['sort']) == Horde_Imap_Client::SORT_REVERSE) {
2659:                $this->_parseSearch($pipeline, end($partial));
3749:        return reset($this->_sendCmd($pipeline)->data['quotaresp']);

lib/horde/framework/Horde/Imap/Client/Base.php
773:                $first = reset($mbox);
1248:            $base = reset($base);
1251:            $base = reset($base);
1732:                    $ptr += reset($tmp);
1757:                : reset($ret);
2235:            (reset($options['results']) == Horde_Imap_Client::SEARCH_RESULTS_COUNT)) {
3365:            return array_merge($rights, str_split(reset($capability)));

lib/horde/framework/Horde/Imap/Client/Fetch/Query.php
354:        $opts = current($this->_data);
366:        return key($this->_data);
374:        next($this->_data);
382:        reset($this->_data);

lib/horde/framework/Horde/Imap/Client/Data/AclRights.php
150:        $val = current($this->_required);
152:            ? current($this->_optional)
161:        $key = key($this->_required);
163:            ? key($this->_optional)
172:        if (key($this->_required) === null) {
173:            next($this->_optional);
175:            next($this->_required);
184:        reset($this->_required);
185:        reset($this->_optional);
193:        return ((key($this->_required) !== null) ||
194:                (key($this->_optional) !== null));

lib/horde/framework/Horde/Mime/Related.php
75:            reset($ids);
76:            $id = next($ids);

lib/horde/framework/Horde/Stream/TempString.php
232:    public function end($offset = 0)

lib/horde/framework/Horde/Mime/Headers/Element.php
68:            return reset($this->_values);

lib/horde/framework/Horde/Mime/Headers/AddressesMulti.php
50:            return strval(reset($this->_values));
61:            ? reset($this->_values)

lib/horde/framework/Horde/Mime/Part/Upgrade/V1.php
112:            $d[10] = reset($data);

lib/horde/framework/Horde/Mime/Headers/Deprecated.php
185:            ? reset($tmp)

lib/horde/framework/Horde/Mime/Headers/Element/Single.php
38:            return reset($this->_values);
58:            $value = reset($value);

lib/filestorage/zip_packer.php
134:                $content = reset($file);

lib/horde/framework/Horde/Mime/Headers.php
152:                ? reset($tmp)

lib/adodb/toexport.inc.php
85:		reset($fieldTypes);

lib/tablelib.php
1683:        if (reset($this->prefs['sortby'])) {
1700:        $sortby = key($sortbys);
1715:        return reset($tableclass);
1725:        return end($tableclass);

lib/adodb/adodb-active-recordx.inc.php
373:				if(($k = reset($obj->TableInfo()->keys))) {
389:			if(($k = reset($table->keys))) {
467:		$fld = reset($cols);
707:		reset($keys);
710:			$value = $row[current($keys)];
713:			if(!next($keys)) {
722:				$value = $row[current($keys)];
725:				if(!next($keys)) {
733:				$value = $row[current($keys)];
736:				if(!next($keys)) {
819:		if(($k = reset($table->keys))) {
827:			if(($k = reset($foreignTable->TableInfo()->keys))) {
869:		if(($k = reset($this->TableInfo()->keys))) {
1001:				$k = reset($table->keys);
1117:					$k = reset($table->keys);
1211:		if(($k = reset($tableInfo->keys))) {
1236:					if(($k = reset($foreignTable->TableInfo()->keys))) {
1252:				if(($k = reset($tableInfo->keys))) {
1465:					if(($k = reset($foreignTable->TableInfo()->keys))) {

lib/adodb/adodb-lib.inc.php
112:	$oldX = sizeof(reset($arr));
226:		$zval = rtrim(reset($zthis->fields));
236:				$zval2 = current(array_slice($zthis->fields, 1, 1));
270:		$zval = rtrim(reset($zthis->fields));
282:				$zval2 = current($fields);
284:					$group = trim(next($fields));

lib/ddl/mysql_sql_generator.php
142:        $first = reset($columns);

lib/ddl/database_manager.php
1208:        $sqltoadd = reset($sqlarr);

lib/ddl/sql_generator.php
328:                    $field = reset($fields);

lib/ddl/postgres_sql_generator.php
123:                $field = reset($fields);

lib/adodb/adodb.inc.php
818:			return $this->UnixTimeStamp(reset($rs->fields));
1421:			$element0 = reset($inputarr);
1423:			$array_2d = $this->bulkBind && is_array($element0) && !is_object(reset($element0));
1450:				$element0 = reset($inputarr);
1653:			$this->genID = reset($rs->fields);
2092:				$ret = reset($rs->fields);
2110:			return reset($rs->fields);
2125:				$ret = reset($rs->fields);
2151:					$rv[] = trim(reset($rs->fields));
2156:					$rv[] = reset($rs->fields);
2173:					$rv[] = trim(reset($rs->fields));
2178:					$rv[] = reset($rs->fields);
4730:					$lnumrows = reset($resultrows->fields);

lib/outputrenderers.php
4558:        $currentnode = end($items);
4721:                $navbarnode = end($items);
4749:            $navbarnode = end($items);

lib/adodb/adodb-loadbalancer.inc.php
108:            end($this->connections);
109:            $i = key($this->connections);

lib/dml/pgsql_native_moodle_recordset.php
146:        $key = reset($this->current);

lib/dml/sqlsrv_native_moodle_recordset.php
118:        $key = reset($this->current);

lib/dml/pdo_moodle_recordset.php
68:        $key = reset($this->current);

lib/questionlib.php
729:                $rec = reset($rec);
1188:        return reset($category);

lib/dml/mysqli_native_moodle_database.php
101:            $charset = reset($collationinfo);
512:                $count = reset($arr);
599:        $charset = reset($collationinfo);
803:                $tablename = reset($arr);
1163:        $charset = reset($collationinfo);
1377:            $id  = reset($row);
1379:                $colname = key($row);
1408:            $return[] = reset($row);
1830:        $bincollate = reset($collationinfo) . '_bin';
1871:        $bincollate = reset($collationinfo) . '_bin';
2094:            if (reset($arr) == 1) {

lib/dml/moodle_database.php
389:        $lowesttransaction = end($this->transactions);
816:                $item = reset($items);
1694:        $return = reset($records);
1757:        return reset($record); // first column

lib/dml/pdo_moodle_database.php
303:            $result[] = reset($value);
333:            $key = reset($value);

lib/dml/pgsql_native_moodle_database.php
419:                $tablename = reset($row);
459:        $cast = is_string(current($items)) ? '::text' : '::bigint';
581:                        $info->default_value = reset($parts);
628:                        $info->default_value = reset($parts);
653:                        $info->default_value = reset($parts);
678:                        $info->default_value = reset($parts);
707:                        $info->default_value = reset($parts);
1041:            $id = reset($row);
1048:                $colname = key($row);
1136:            $params['id'] = reset($row);

lib/dml/sqlsrv_native_moodle_database.php
165:                $correctrcsmode = (bool)reset($row);
468:                $tablename = reset($row);
989:            $id = reset($rowarray);
992:                $colname = key($rowarray);
1018:            $results[] = reset($rowarray);
1361:                $this->collation = reset($rawcolumn);
1649:                $property = (bool)reset($row);

lib/dml/oci_native_moodle_recordset.php
69:        $key = reset($this->current);

lib/dml/mysqli_native_moodle_recordset.php
75:        $key = reset($this->current);

lib/dml/oci_native_moodle_database.php
217:        $this->unique_session_id = reset($records[0]);
930:                    $columnname   = key($value);    // columnname is the key of the array
1181:            $id = reset($row);
1183:                $colname = key($row);
1216:        $return = reset($records);
1741:            $arg = reset($args);
1801:        return isset($records[0]) && reset($records[0]) ? true : false;

lib/markdown/MarkdownExtra.php
1674:			$footnote = reset($this->footnotes_ordered);
1675:			$note_id = key($this->footnotes_ordered);

lib/xmldb/xmldb_structure.php
138:                end($this->tables);
139:                $prevtable = $this->tables[key($this->tables)];

lib/xmldb/xmldb_table.php
81:                end($allfields);
82:                $prevfield = $allfields[key($allfields)];
145:                end($allkeys);
146:                $prevkey = $allkeys[key($allkeys)];
207:                end($allindexes);
208:                $previndex = $allindexes[key($allindexes)];

lib/jssourcemap.php
49:$jsfile = reset($jsfiles);

lib/php-jwt/src/JWT.php
257:                    $key = base64_decode((string) end($lines));
314:                    $key = base64_decode((string) end($lines));

lib/xmlize.php
167:                    end($current[$level]);
168:                    if (is_int(key($current[$level]))) { // If last index is nummeric we have CDATA and concat.

lib/modinfolib.php
442:            $courseidtoremove = key(array_reverse(self::$cacheaccessed, true));

lib/classes/user.php
1146:                    $first = reset($definition['choices']);

lib/mlbackend/php/classes/processor.php
353:            $avgscore = reset($scores);

lib/classes/check/check.php
74:        return end($id);

lib/classes/check/table.php
79:                $this->detail = reset($this->checks);

lib/classes/check/environment/antivirus.php
83:        $reader = reset($readers);

lib/classes/event/manager.php
112:                $event = reset(self::$extbuffer);
113:                unset(self::$extbuffer[key(self::$extbuffer)]);
116:                $event = reset(self::$buffer);
117:                unset(self::$buffer[key(self::$buffer)]);

lib/classes/task/send_failed_login_notifications_task.php
76:        $reader = reset($readers);
77:        $readername = key($readers);

lib/classes/task/adhoc_task.php
57:        $classname = end($classparts);

lib/mlbackend/php/phpml/src/Phpml/Clustering/KMeans.php
38:        $space = new Space(count(reset($samples)));

lib/mlbackend/php/phpml/src/Phpml/Clustering/FuzzyCMeans.php
107:            reset($column);
108:            $cluster = $this->clusters[key($column)];

lib/mlbackend/php/phpml/src/Phpml/Preprocessing/OneHotEncoder.php
28:        foreach (array_keys(array_values(current($samples))) as $column) {

lib/mlbackend/php/phpml/src/Phpml/Helper/OneVsRest.php
82:        $classifierref = reset($this->classifiers);
119:        return key($probs);

lib/mlbackend/php/phpml/src/Phpml/Classification/NaiveBayes.php
99:        reset($predictions);
101:        return key($predictions);

lib/mlbackend/php/phpml/src/Phpml/Classification/KNearestNeighbors.php
55:        reset($predictions);
57:        return key($predictions);

lib/mlbackend/php/phpml/src/Phpml/Classification/Ensemble/Bagging.php
166:        reset($counts);
168:        return key($counts);

lib/mlbackend/php/phpml/src/Phpml/Classification/DecisionTree.php
278:            $split->classValue = (string) key($remainingTargets);
310:            $baseValue = key($counts);

lib/classes/message/manager.php
128:                $otheruser = reset($otherusers);

lib/classes/navigation/views/secondary.php
442:                    self::TYPE_COURSE, null, 'coursehome'), reset($nodekeys)
1111:            $module = current(array_filter(get_course_mods($course->id), function ($module) {

lib/classes/progress/base.php
108:            $prevmax = end($this->maxes);
110:                $prevcurrent = end($this->currents);
148:            $lastmax = end($this->maxes);
150:                $lastvalue = end($this->currents);
151:                $this->currents[key($this->currents)] = $lastvalue + $parentcount;
175:        $max = end($this->maxes);
190:            $current = end($this->currents);
201:            $this->currents[key($this->currents)] = $progress;
230:        $current = end($this->currents);
262:        $max = end($this->maxes);
274:        $description = end($this->descriptions);

lib/simplepie/library/SimplePie/Parser.php (auto)
308:			$base = $this->registry->call('Misc', 'absolutize_url', array($attribs[SIMPLEPIE_NAMESPACE_XML]['base'], end($this->xml_base)));
317:			$this->xml_base[] = end($this->xml_base);
318:			$this->xml_base_explicit[] = end($this->xml_base_explicit);
327:			$this->xml_lang[] = end($this->xml_lang);
333:			if (end($this->namespace) === SIMPLEPIE_NAMESPACE_XHTML)
335:				$this->data['data'] .= '<' . end($this->element);
349:			$this->data =& $this->data['child'][end($this->namespace)][end($this->element)][];
350:			$this->data = array('data' => '', 'attribs' => $attribs, 'xml_base' => end($this->xml_base), 'xml_base_explicit' => end($this->xml_base_explicit), 'xml_lang' => end($this->xml_lang));
351:			if ((end($this->namespace) === SIMPLEPIE_NAMESPACE_ATOM_03 && in_array(end($this->element), array('title', 'tagline', 'copyright', 'info', 'summary', 'content')) && isset($attribs['']['mode']) && $attribs['']['mode'] === 'xml')
352:			|| (end($this->namespace) === SIMPLEPIE_NAMESPACE_ATOM_10 && in_array(end($this->element), array('rights', 'subtitle', 'summary', 'info', 'title', 'content')) && isset($attribs['']['type']) && $attribs['']['type'] === 'xhtml')
353:			|| (end($this->namespace) === SIMPLEPIE_NAMESPACE_RSS_20 && in_array(end($this->element), array('title')))
354:			|| (end($this->namespace) === SIMPLEPIE_NAMESPACE_RSS_090 && in_array(end($this->element), array('title')))
355:			|| (end($this->namespace) === SIMPLEPIE_NAMESPACE_RSS_10 && in_array(end($this->element), array('title'))))
379:			if (end($this->namespace) === SIMPLEPIE_NAMESPACE_XHTML && !in_array(end($this->element), array('area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param')))
381:				$this->data['data'] .= '</' . end($this->element) . '>';

lib/simplepie/library/SimplePie/gzdecode.php (auto)
226:			if (current(unpack('S', "\x00\x01")) === 1)
230:			$this->MTIME = current(unpack('l', $mtime));
253:				$len = current(unpack('v', substr($this->compressed_data, $this->position, 2)));
318:					$crc = current(unpack('v', substr($this->compressed_data, $this->position, 2)));
345:			$crc = current(unpack('V', substr($this->compressed_data, $this->position, 4)));
347:			/*if (extension_loaded('hash') && sprintf('%u', current(unpack('V', hash('crc32b', $this->data)))) !== sprintf('%u', $crc))
353:			$isize = current(unpack('V', substr($this->compressed_data, $this->position, 4)));

lib/simplepie/library/SimplePie/Misc.php (auto)
126:						$return[$i]['attribs'][strtolower($attribs[$j][1])]['data'] = SimplePie_Misc::entities_decode(end($attribs[$j]));

lib/simplepie/library/SimplePie/HTTP/Parser.php (auto)
512:			$data = end($exploded);
516:			$data = end($exploded);

lib/xhprof/xhprof_moodle.php
627:        reset($runs);

lib/resourcelib.php
179:        $url = reset($parts);

lib/licenselib.php
284:            $license = reset($licenses);

backup/util/helper/backup_array_iterator.class.php
44:        reset($this->arr);
49:        return current($this->arr);
54:        return key($this->arr);
58:        next($this->arr);
62:        return key($this->arr) !== null;
66:        reset($this->arr); // Just reset the array

lib/installlib.php
56:    $wwwroot .= reset($hostport);

lib/mlbackend/python/classes/processor.php
529:        $requiredapiver = reset($parts);
532:        $actualapiver = reset($parts);

lib/guzzlehttp/promises/src/EachPromise.php
103:            reset($this->pending);
106:            while ($promise = current($this->pending)) {
107:                next($this->pending);

lib/form/defaultcustom.php
242:            $firstelement = reset($this->_elements);

lib/form/editor.php
448:            $format = key($formats);

lib/guzzlehttp/psr7/src/Message.php (auto)
190:        $host = $headers[reset($hostKey)][0];

lib/guzzlehttp/psr7/src/UriResolver.php (auto)
166:            $lastSegment = end($segments);

lib/form/modvisible.php
146:            $key = key($value);

lib/guzzlehttp/kevinrob/guzzlecache/src/KeyValueHttpHeader.php (auto)
82:        return current($this->values);
93:        next($this->values);
106:        return key($this->values);
118:        return key($this->values) !== null;
129:        reset($this->values);

lib/guzzlehttp/kevinrob/guzzlecache/src/Strategy/GreedyCacheStrategy.php (auto)
100:            $ttl = (int)reset($ttlHeaderValues);

backup/util/helper/restore_decode_rule.class.php
162:        if (reset($smatches) != 1 || end($smatches) != $countma) {

lib/pear/PEAR.php
505:            count($exp = end($this->_expected_errors))
508:                (is_int(reset($exp)) && in_array($code, $exp)) ||
509:                (is_string(reset($exp)) && in_array($message, $exp))
751:        reset($_PEAR_destructor_object_list);

lib/pear/HTML/QuickForm.php
628:                $this->_duplicateIndex[$elementName][] = end($elKeys);
636:            $this->_elementIndex[$elementName] = end($elKeys);
685:        for ($i = end($elKeys); $i >= $targetIdx; $i--) {

lib/pear/HTML/QuickForm/hierselect.php
249:                        $value = is_array($v = $select->getValue()) ? $v[0] : key($array);

lib/deprecatedlib.php
3308:            $lastelement = end($alternatenames);
3501:        $first_plugin = reset($plugins);
3564:        $first_plugin = reset($plugins);

lib/accesslib.php
1611:            $ra = reset($ras);
4644:    $first = reset($roleoptions);
4658:        $first = reset($roleoptions);

backup/util/dbops/restore_controller_dbops.class.php
244:                $value = reset($options);

backup/util/dbops/restore_dbops.class.php
862:                         $targetcontext = context::instance_by_id(reset($matchingcontexts)->contextid);
1087:                            $foundfile = reset($foundfiles);

backup/util/xml/parser/processors/simplified_parser_processor.class.php
179:        if ($element = reset($this->startendinfo)) {

backup/util/xml/parser/processors/grouped_parser_processor.class.php
304:                end($info);
305:                $key = key($info);

backup/util/ui/restore_ui_components.php
193:            $firstcap = reset($this->requiredcapabilities);

lib/tcpdf/tcpdf.php (auto)
4921:		reset($this->embeddedfiles);
6130:					if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) {
6131:						$pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']);
6143:					if (end($this->transfmrk[$this->page]) !== false) {
6144:						$pagemarkkey = key($this->transfmrk[$this->page]);
7688:			$signature = current(unpack('H*', $signature));
10929:				$hexsignature = current(unpack('H*', $signature));
11376:			if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) {
11377:				$key = key($this->xobjects[$this->xobjid]['transfmrk']);
11380:		} elseif (end($this->transfmrk[$this->page]) !== false) {
11381:			$key = key($this->transfmrk[$this->page]);
12426:			$lastoutline = end($this->outlines);
16586:					$dom[$key]['parent'] = end($level);
16649:					$dom[$key]['parent'] = end($level);
17139:				$dom[$key]['parent'] = end($level);
17853:								reset($lnstring);
19882:									if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) {
19883:										$pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']);
19896:									if (end($this->transfmrk[$this->page]) !== false) {
19897:										$pagemarkkey = key($this->transfmrk[$this->page]);
20290:					if (end($this->xobjects[$this->xobjid]['transfmrk']) !== false) {
20291:						$pagemarkkey = key($this->xobjects[$this->xobjid]['transfmrk']);
20303:					if (end($this->transfmrk[$this->page]) !== false) {
20304:						$pagemarkkey = key($this->transfmrk[$this->page]);
23939:			if (end($this->svgdefs) !== FALSE) {
23940:				$last_svgdefs_id = key($this->svgdefs);
24599:			if (end($this->svgdefs) !== FALSE) {
24600:				$last_svgdefs_id = key($this->svgdefs);

webservice/tests/helpers.php
114:            $instance = reset($instances);

cohort/upload_form.php
186:        $file = reset($files);

question/type/questionbase.php
810:        $hintid = reset($args); // Itemid is hint id.

question/type/numerical/db/upgradelib.php
49:                $unit = reset($this->question->options->units);

question/type/truefalse/question.php
115:            $answerid = reset($args); // Itemid is answer id.

question/type/numerical/question.php
311:            $answerid = reset($args); // Itemid is answer id.

question/type/essay/renderer.php
335:            reset($formats);
337:                    'name' => $inputname . 'format', 'value' => key($formats)));

question/type/numerical/questiontype.php
707:        reset($this->units);
708:        return key($this->units);

grade/import/xml/lib.php
48:                $grade_item = reset($grade_items);

question/type/calculated/questiontype.php
1068:                $unit = reset($units);

question/type/calculated/db/upgradelib.php
60:                $unit = reset($this->question->options->units);

question/type/shortanswer/question.php
176:            $answerid = reset($args); // Itemid is answer id.

question/type/calculated/question.php
435:                '{' . reset($datasets) . '}');

question/type/match/question.php
384:            $subqid = reset($args); // Itemid is sub question id.

question/type/ddmarker/question.php
50:            $itemid = reset($args);

question/type/ddimageortext/questiontypebase.php
87:            end($question->choices[$choice->choice_group()]);
89:                    key($question->choices[$choice->choice_group()]));

question/type/ddimageortext/questionbase.php
90:            $itemid = reset($args);

question/type/multianswer/renderer.php
332:        $rightanswer = $subq->answers[$order[reset($correctresponses)]];

question/type/multichoice/question.php
152:            $answerid = reset($args); // Itemid is answer id.
156:            $answerid = reset($args); // Itemid is answer id.

search/classes/manager.php
1730:            $request = reset($requests);

question/type/gapselect/questiontypebase.php
173:            end($question->choices[$choice->choice_group()]);
175:                    key($question->choices[$choice->choice_group()]));

question/engine/questionattempt.php
467:        return end($this->steps);
965:        end($this->steps);
966:        $this->observer->notify_step_added($step, $this, key($this->steps));
977:        end($this->steps);
978:        $this->observer->notify_step_added($step, $this, -key($this->steps));
1003:        $laststep = end($this->steps);
1008:        $this->observer->notify_step_modified($this->autosavedstep, $this, key($this->steps));

question/engine/tests/helpers.php
256:            $which = reset($available);
846:        reset($data);
847:        if (count($data) == 1 && key($data) === '-finish') {
1361:        reset($this->records);
1370:        return (object) current($this->records);
1375:        if (is_null(key($this->records))) {
1378:        $current = current($this->records);
1379:        return reset($current);
1383:        next($this->records);
1387:        return !is_null(key($this->records));

question/behaviour/rendererbase.php
111:            reset($formats);
113:                    'name' => $inputname . 'format', 'value' => key($formats)));

question/engine/questionusage.php
236:        reset($this->questionattempts);
237:        return key($this->questionattempts);
1061:        return $this->offsetGet(current($this->slots));
1071:        return current($this->slots);
1078:        next($this->slots);
1085:        reset($this->slots);
1094:        return current($this->slots) !== false;

question/engine/datalib.php
1606:            $qa = reset($info);
1611:            $qa = reset($info);

question/engine/upgrade/behaviourconverters.php
185:            if ($state->answer == reset($this->qstates)->answer) {
459:        $state = end($this->qstates);

search/classes/document.php
650:                $file = reset($files);

grade/report/index.php
73:        reset($reports);
74:        $last = key($reports);

grade/report/outcomes/index.php
88:                $info = reset($info);

grade/lib.php
2343:            $category_item = reset($element['children']); //keep only category item
2344:            $element['children'] = array(key($element['children'])=>$category_item);
2348:                reset($element['children']);
2349:                $first_key = key($element['children']);
2394:        $first_item = reset($element['children']);
2397:            $order = key($element['children']);
2498:        $last_child  = end($chids);
2499:        $first_child = reset($chids);
2506:        $maxdepth = reset($chdepths);

contentbank/classes/content.php
342:            $file = reset($files);

contentbank/classes/form/upload_files.php
152:            $file = reset($files);

grade/edit/outcome/import.php
197:            $scale_id = key($scale);

grade/edit/tree/lib.php
924:                $grademax = end($scale_items) . ' (' .
927:                $grademax = end($scale_items) . ' (' . count($scale_items) . ')';

grade/report/singleview/classes/local/screen/user.php
105:                $this->item = reset($validusers);

grade/querylib.php
154:            $grade = reset($grades);
288:    $grade_item = reset($grade_items);

question/bank/columnsortorder/classes/column_manager.php
101:                'colname' => end($classelements),
239:                    $columnorder[end($colname)] = $colposition;

question/bank/importquestions/classes/form/import_form.php
155:        $file = reset($files);

search/engine/solr/classes/engine.php
482:                    $doc->$field = reset($highlighteddoc->$field);
591:            $firstdoc = reset($groupdocs);

question/classes/statistics/questions/calculated.php
279:        if (count($variants) > 1 || reset($variants) != 1) {

question/classes/local/bank/view.php
546:        $order = reset($this->sort);
547:        $primarysort = key($this->sort);

grade/grading/lib.php
458:            $areatitle = reset($areas);
459:            $areaname  = key($areas);

question/classes/local/bank/random_question_loader.php
101:        reset($this->availablequestionscache[$categorykey]);
102:        $lowestcount = key($this->availablequestionscache[$categorykey]);
103:        reset($this->availablequestionscache[$categorykey][$lowestcount]);
104:        $questionid = key($this->availablequestionscache[$categorykey][$lowestcount]);

grade/grading/form/guide/lib.php
586:                $record = reset($rs);

grade/grading/form/rubric/lib.php
600:                $record = reset($rs);

question/classes/local/bank/column_base.php
348:        $firstquestion = reset($questions);

grade/grading/classes/privacy/provider.php
233:            $firstrecord = current($records);

question/classes/statistics/responses/analysis_for_class.php
147:            $singleactualresponse = reset($actualresponses);

enrol/paypal/lib.php
252:            $instance = reset($instances);

user/profile/definelib.php
307:            $newcategory = reset($categories); // Get first category if sortorder broken.

enrol/paypal/settings.php
67:        $student = reset($student);

enrol/lti/classes/helper.php
214:        $iconfile = reset($iconfile);

enrol/lti/classes/task/sync_grades.php
137:                                $grade = reset($grades->items[0]->grades);

enrol/lti/classes/local/ltiadvantage/task/sync_grades.php
120:                            $grade = reset($grades->items[0]->grades);

enrol/mnet/settings.php
36:        $student = reset($student);

enrol/self/settings.php
80:        $student = reset($student);

enrol/imsenterprise/lib.php
577:                        $auth = reset($auth);

enrol/self/lib.php
531:            $this->lasternoller = reset($users);
563:            $instance = reset($instances);

user/classes/form/calendar_form.php
145:                $calendar = reset($calendarselected);

user/language_form.php
79:            $lang = reset($langsel);

enrol/flatfile/lib.php
613:            $this->lasternoller = reset($users);

enrol/manual/lib.php
348:            $this->lasternoller = reset($users);
390:            $instance = reset($instances);

enrol/ldap/lib.php
1010:            $first = reset($categories);
1137:            $instance = reset($instances);

enrol/manual/settings.php
64:        $student = reset($student);

enrol/cohort/settings.php
37:        $student = reset($student);

user/selector/lib.php
221:            return reset($users);
556:                count(reset($groupedusers)) == 1) {

enrol/fee/settings.php
72:        $student = reset($student);

completion/data_object.php
193:            return reset($instances);

enrol/fee/classes/plugin.php
257:            $instance = reset($instances);

completion/classes/bulkedit_form.php
68:        $cm = reset($this->cms);
98:        $cm = reset($this->cms); // First selected course module.

enrol/database/settings.php
88:        $student = reset($student);

enrol/database/lib.php
216:                    $roleid = reset($enrols[$courseid]);
377:                        $mapping = reset($mapping);
690:            $first = reset($categories);

message/classes/privacy/provider.php
348:        $context = reset($contexts);
963:                    if ($otheruser = reset($members)) {

message/classes/search/base_message.php
115:     * Sorting the current(user1) and other(user2) user in the conversation.

admin/settings.php
74:        $firsterror = reset($adminroot->errors);

rss/classes/privacy/provider.php
106:        $context = reset($contexts);
159:        $context = reset($contexts);

admin/index.php
765:    $adminuser = get_complete_user_data('id', reset($adminids));

admin/upgradesettings.php
50:    $firsterror = reset($adminroot->errors);

admin/roles/admins.php
85:        $newmain = reset($newmain);

admin/roles/manage.php
172:$firstrole = reset($roles);
173:$lastrole = end($roles);

admin/roles/classes/preset.php
265:        $elname = end($parts);

admin/roles/classes/preset_form.php
112:            $file = reset($files);

admin/search.php
43:        $firsterror = reset($adminroot->errors);

admin/user.php
244:        $sort = reset($usernames);

admin/mnet/services_form.php
46:            $version = current($versions);

admin/tool/uploaduser/classes/cli_helper.php
364:                    $firstoption = reset($selectoptions);

admin/cli/mysql_collation.php
68:    $charset = reset($collationinfo);

admin/cli/install.php
234:    reset($databases);
235:    $defaultdb = key($databases);

admin/presets/classes/manager.php
318:            $settingtype = end($namespacedata);

admin/tool/policy/accept.php
49:    $userid = reset($userids);

admin/tool/policy/classes/acceptances_table.php
87:            $version = reset($versions);
175:        $v = key($this->versionids);

admin/tool/policy/classes/output/page_managedocs_list.php
90:            if ($firstversion = $policy->currentversion ?: (reset($policy->draftversions) ?: reset($policy->archivedversions))) {

admin/tool/policy/classes/output/user_agreement.php
122:            $versionname = reset($this->versions);
123:            $versionid = key($this->versions);

admin/tool/policy/classes/output/acceptances_filter.php
213:            $value = reset($values);
307:            return reset($versions);
373:            $version = $versionid ? $policies[$policyid]->versions[$versionid] : reset($policies[$policyid]->versions);
378:                $firstversion = reset($policy->versions);

admin/tool/uploadcourse/classes/helper.php
580:                    $record = reset($records);

admin/tool/uploadcourse/classes/course.php
984:                    $methodinstance = empty($methodinstances) ? null : reset($methodinstances);
1174:    protected function reset($course) {

admin/tool/analytics/classes/output/insights_report.php
156:        $predictionactions = $this->model->get_target()->prediction_actions(reset($predictions), true, true);

admin/user/user_bulk_download.php
82:                $userprofiledata[$field] = reset($user->$field);

admin/tool/mobile/classes/api.php
642:                $lastkey = end($infokeys);

admin/tool/mobile/classes/privacy/provider.php
104:        $context = reset($contexts);
153:        $context = reset($contexts);
172:        $userid = reset($userids);

admin/tool/recyclebin/classes/course_bin.php
237:        $file = reset($files);

admin/tool/moodlenet/lib.php
46:    $domain = end($urlportions);

admin/tool/generator/classes/course_backend.php
332:        reset($this->userids);
563:        } else if ($userid = current($this->userids)) {
565:            next($this->userids);
568:            $userid = reset($this->userids);

admin/tool/generator/cli/maketestplan.php
88:    cli_error("Error: " . reset($errors));

admin/tool/generator/classes/testplan_backend.php
254:        $data->pageid = reset($pages)->id;
260:        $forum = reset($forums);
266:        $discussion = reset($discussions);

admin/tool/recyclebin/classes/category_bin.php
223:        $file = reset($files);

admin/tool/dataprivacy/classes/external.php
101:            $request = reset($requests);

admin/tool/xmldb/actions/view_structure_php/view_structure_php.class.php
84:        $table = reset($tables);

admin/tool/xmldb/actions/view_table_php/view_table_php.class.php
93:        $field = reset($fields);

admin/tool/lp/classes/form/plan.php
80:            $mform->addElement('static', 'staticstatus', get_string('status', 'tool_lp'), current($status));

admin/tool/monitor/classes/privacy/provider.php
179:        $userid = reset($userids);

admin/category.php
75:        $firsterror = reset($adminroot->errors);

message/classes/api.php
1601:            $otheruser = reset($otheruser);

admin/settings/analytics.php
109:                $defaultreader = reset($enabledlogstores);

admin/settings/subsystems.php
77:        $charset = reset($collationinfo);

admin/settings/courses.php
141:    $temp->add(new admin_setting_configselect('moodlecourse/lang', new lang_string('forcelanguage'), '', key($languages),
165:            new lang_string('courselegacyfiles_help'), key($choices), $choices));
175:        new lang_string('coursehelpmaximumupload'), key($choices), $choices));
197:    $temp->add(new admin_setting_configselect('moodlecourse/groupmode', new lang_string('groupmode'), '', key($choices),$choices));

group/lib.php
1100:            $userrole = reset($visibleuserroles);

auth/lti/auth.php
437:        $iconfile = reset($iconfile);

group/index.php
216:    if ($groupmemberroles = groups_get_members_by_role(reset($groupids), $courseid,

cache/locallib.php
101:        $lockconf = reset($this->configlocks);

group/autogroup_form.php
86:        $student = reset($student);

auth/mnet/auth.php
395:                    $defaultrole = reset($studentroles);

auth/oauth2/classes/auth.php
272:        $iconfile = reset($iconfile);

auth/shibboleth/login.php
84:            $name = reset($data);

auth/ldap/auth.php
2061:            $user = end($matches);

cache/stores/session/lib.php
545:        for ($value = reset($this->store); $value !== false; $value = next($this->store)) {

cache/stores/mongodb/MongoDB/Collection.php (auto)
351:        return current($this->createIndexes([['key' => $key] + $indexOptions], $commandOptions));

cache/stores/redis/classes/task/ttl.php
76:                    $infotext = 'Deleted ' . $info['keys'] . ' key(s) in ' .

cache/stores/mongodb/MongoDB/Command/ListDatabases.php (auto)
110:        $result = current($cursor->toArray());

cache/stores/mongodb/MongoDB/Model/DatabaseInfoLegacyIterator.php (auto)
53:        return new DatabaseInfo(current($this->databases));
63:        return key($this->databases);
73:        next($this->databases);
83:        reset($this->databases);
93:        return key($this->databases) !== null;

cache/stores/mongodb/MongoDB/Model/CachingIterator.php (auto)
90:        $currentItem = current($this->items);
102:        $currentItem = current($this->items);
121:        next($this->items);
136:        reset($this->items);

cache/stores/mongodb/MongoDB/functions.php (auto)
197:    reset($document);
198:    $firstKey = (string) key($document);
232:        reset($stage);
233:        $key = key($stage);
269:    $lastOp = end($pipeline);
277:    return in_array(key($lastOp), ['$out', '$merge'], true);
308:    reset($out);
310:    return key($out) === 'inline';

cache/stores/mongodb/MongoDB/Operation/DropIndexes.php (auto)
133:        return current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/FindOne.php (auto)
127:        $document = current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/DropCollection.php (auto)
130:        return current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/Aggregate.php (auto)
295:        $result = current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/ModifyCollection.php (auto)
116:        return current($cursor->toArray());

cache/classes/loaders.php
1368:                if (end($this->staticaccelerationkeys) !== $key) {

cache/classes/local/administration_display_helper.php
635:            'mode_'.cache_store::MODE_APPLICATION => key($defaultmodestores[cache_store::MODE_APPLICATION]),
636:            'mode_'.cache_store::MODE_SESSION => key($defaultmodestores[cache_store::MODE_SESSION]),
637:            'mode_'.cache_store::MODE_REQUEST => key($defaultmodestores[cache_store::MODE_REQUEST]),

cache/stores/mongodb/MongoDB/Operation/FindAndModify.php (auto)
254:        $result = current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/Count.php (auto)
158:        $result = current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/BulkWrite.php (auto)
151:            $type = key($operation);
152:            $args = current($operation);
325:            $type = key($operation);
326:            $args = current($operation);

cache/stores/mongodb/MongoDB/Operation/CountDocuments.php (auto)
144:        $result = current($allResults);

cache/stores/mongodb/MongoDB/Operation/Explain.php (auto)
124:        return current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/CreateCollection.php (auto)
279:        return current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/RenameCollection.php (auto)
125:        return current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/Distinct.php (auto)
152:        $result = current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/MapReduce.php (auto)
304:        $result = current($cursor->toArray());

cache/stores/mongodb/MongoDB/Operation/DropDatabase.php (auto)
103:        return current($cursor->toArray());

reportbuilder/classes/table/custom_report_table.php
341:            $rowfirstcolumn = strip_tags((string) reset($row));

reportbuilder/classes/local/report/column.php
338:                $sql = reset($fieldparts);
396:            $field = reset($fieldsalias);
439:        return reset($fields)['alias'];
654:        $value = reset($values);

reportbuilder/classes/local/entities/base.php
93:        return end($namespace);

reportbuilder/classes/local/aggregation/groupconcat.php
114:        $firstvalue = reset($values);

reportbuilder/classes/local/aggregation/sum.php
79:        $firstvalue = reset($values);

reportbuilder/classes/local/aggregation/avg.php
79:        if (reset($values) === null) {
83:            return format_float((float) reset($values), 1);

reportbuilder/classes/local/aggregation/count.php
79:        return (int) reset($values);

reportbuilder/classes/local/aggregation/percent.php
76:        if (reset($values) === null) {
79:        return format::percent((float) reset($values));

reportbuilder/classes/local/aggregation/countdistinct.php
93:        return (int) reset($values);

reportbuilder/classes/local/aggregation/base.php
41:        return end($namespacedclass);
76:        return reset($sqlfields);

payment/classes/helper.php
372:                $gateway = reset($records);

payment/tests/generator/lib.php
69:            $data['gateway'] = reset($gateways);

course/modlib.php
350:                    $item = reset($items);

course/user.php
119:    $mode = reset($modes);

course/moodleform_mod.php
1124:                    $areadata = reset($this->current->_advancedgradingdata['areas']);
1125:                    $areaname = key($this->current->_advancedgradingdata['areas']);

course/request.php
59:    $categoryid = array_key_exists($CFG->defaultrequestcategory, $list) ? $CFG->defaultrequestcategory : key($list);

course/dnduploadlib.php
497:        $repo = reset($repo); // Get the first (and only) upload repo.

course/management.php
75:    $category = reset($topchildren);
414:                    redirect(new moodle_url($PAGE->url, array('categoryid' => reset($categoryids))));

course/format/singleactivity/lib.php
288:                $firstorphanedcm = reset($cmlist);

course/lib.php
348:                    $firstsection = reset($sections);
2095:    $reader = reset($readers);
3558:        $swapcourse = reset($swapcourse);

course/format/topics/classes/courseformat/stateactions.php
65:        $section = $modinfo->get_section_info_by_id(reset($ids), MUST_EXIST);

course/format/classes/base.php
136:            $defaultformat = reset($plugins);
186:                $format = reset($formats);

calendar/lib.php
2161:            $course = reset($courseeventsfrom);

privacy/classes/local/request/moodle_content_writer.php
442:                if (end($filenamearray) !== 'json') {
664:        $navigationpage = new \core_privacy\output\exported_navigation_page(current($richtree));

course/classes/deletecategory_form.php
108:            $option = reset($optionkeys);

calendar/classes/rrule_manager.php
253:            $updatedata->timestart = reset($eventtimes);
738:            $tmpevent->timestart = end($eventtimes);

course/classes/category.php
265:                $record = reset($records);
321:            return reset($children);
414:            $defcategory = reset($visiblechildren);
1258:            $property = key($sortfields);
3059:        $swapcategory = reset($swapcategory);

blocks/activity_results/block_activity_results.php
305:                $groupgrade = end($groupgrades);
307:                    $best[key($groupgrades)] = $groupgrade['average'];
308:                    $groupgrade = prev($groupgrades);
312:                $groupgrade = reset($groupgrades);
314:                    $worst[key($groupgrades)] = $groupgrade['average'];
315:                    $groupgrade = next($groupgrades);
491:                $grade = end($grades);
494:                    $grade = prev($grades);
498:                $grade = reset($grades);
501:                    $grade = next($grades);

blocks/glossary_random/block_glossary_random.php
130:                $entry = reset($entry);

blocks/recentlyaccesseditems/classes/observer.php
80:                    'id' => end($records)->id,

blocks/edit_form.php
87:        $first = reset($weightoptions);
89:        $last = end($weightoptions);

repository/filesystem/lib.php
284:            $lastcrumb = end($breadcrumb);

repository/wikimedia/wikimedia.php
128:                $file_name = end($dir_parts);

blocks/accessreview/settings.php
63:        key($options),

repository/googledocs/lib.php
201:            $tmp = end($breadcrumb);

blocks/myoverview/classes/output/main.php
223:        $this->view = $view ? $view : reset($this->layouts);
318:            $preferences[reset($this->layouts)] = true;
435:                    $firstfield = reset($customfieldvalues);
459:            'view' => in_array($this->view, $this->layouts) ? $this->view : reset($this->layouts),

repository/googledocs/classes/googledocs_content.php
106:            $tmp = end($nav);

repository/dropbox/classes/dropbox.php
353:            $link = reset($data->links);

calendar/classes/external/month_exporter.php
330:        $day = reset($alldays);

repository/onedrive/lib.php
178:            $tmp = end($breadcrumb);
393:                        $first = reset($thumbs);
1072:        $skydriveinstance = reset($skydriveinstances);
1074:        $onedriveinstance = reset($onedriveinstances);

repository/onedrive/classes/privacy/provider.php
139:        $context = reset($contexts);
213:        $context = reset($contexts);

competency/classes/user_competency.php
496:            $test = reset($competenciesorids);

repository/classes/privacy/provider.php
133:        $context = reset($contexts);
221:        $context = reset($contexts);

competency/classes/user_competency_plan.php
247:            $test = reset($competenciesorids);

competency/classes/user_competency_course.php
215:            $test = reset($competenciesorids);

competency/classes/api.php
5027:            $uc = reset($all);