CoreFiles by mySites.guru
Php81.php37 lines, 710 bytes, from Joomla_4.4.2-Stable-Full_Package.zip
Raw History Compare with 4.4.1
md5
907c5e142a4f3c15922efc5a6f0571c6
sha1
9118e905b2cced6f22a60be3d7363e67997aeb6a
sha256
94b6708cc320d190af07d295d31320d91f9f90d666537055af6b659de8672085
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Polyfill\Php81;

/**
 * @author Nicolas Grekas <[email protected]>
 *
 * @internal
 */
final class Php81
{
    public static function array_is_list(array $array): bool
    {
        if ([] === $array || $array === array_values($array)) {
            return true;
        }

        $nextKey = -1;

        foreach ($array as $k => $v) {
            if ($k !== ++$nextKey) {
                return false;
            }
        }

        return true;
    }
}

The same content is in 49 releases, Joomla 4.2.9 to 4.4.14. See them all, or every version of this file.