array_reverse

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return an array with elements in reverse order
<?php array_reverse(array $array, bool $preserve_keys = false): array
<?php             return empty($array) ? value($default) : end($array);

        }



        return static::first(array_reverse($array, true), $callback, $default);

    }
<?php     public function reverse()

    {

        return new static(array_reverse($this->items, true));

    }
<?php                     $values = [data_get($a, $prop), data_get($b, $prop)];



                    if (! $ascending) {

                        $values = array_reverse($values);

                    }



                    if (($options & SORT_FLAG_CASE) === SORT_FLAG_CASE) {
<?php         $migrations = array_reverse($this->repository->getRan());



        if (count($migrations) === 0) {

            $this->write(Info::class, 'Nothing to rollback.');
<?php         }



        if ($this->option('reverse')) {

            $routes = array_reverse($routes);

        }



        return $this->pluckColumns($routes);
<?php     public function then(Closure $destination)

    {

        $pipeline = array_reduce(

            array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)

        );



        return $pipeline($this->passable);
<?php         $results = [];



        foreach (array_reverse(class_parents($class) ?: []) + [$class => $class] as $class) {

            $results += trait_uses_recursive($class);

        }
<?php     public static function after($subject, $search)

    {

        return $search === '' ? $subject : array_reverse(explode($search, $subject, 2))[0];

    }
<?php     public static function reverse(string $value)

    {

        return implode(array_reverse(mb_str_split($value)));

    }
<?php     protected function addFooters($result)

    {

        return ltrim($result, "\n")

                ."\n".implode("\n", array_reverse($this->footer));

    }
<?php         $output = '';



        if (isset($this->prepends[$section])) {

            $output .= implode(array_reverse($this->prepends[$section]));

        }



        if (isset($this->pushes[$section])) {
<?php         $testCaseFound = false;

        $class = false;



        foreach (array_reverse($loadedClasses) as $loadedClass) {

            if (

                is_subclass_of($loadedClass, HasPrintableTestCaseName::class)

                || is_subclass_of($loadedClass, TestCase::class)) {
<?php         }



        if (! $testCaseFound) {

            foreach (array_reverse($loadedClasses) as $loadedClass) {

                $offset = 0 - strlen($suiteClassName);



                if (stripos(substr($loadedClass, $offset - 1), '\\'.$suiteClassName) === 0 ||
<?php         $lines = explode(PHP_EOL, $this->buffer);



        $lines = array_reverse($lines);

        $firstLine = array_pop($lines);

        $lines = array_reverse($lines);
<?php         $lines = array_reverse($lines);

        $firstLine = array_pop($lines);

        $lines = array_reverse($lines);



        View::render('components.badge', [

            'type' => $type,