diff

@param array[]|static[] ...$args

@return  static

@since  3.5
430160
public function diff(...$args): self
    {
        $args = array_map([Arr::class, 'toArray'], $args);

        return new static(array_diff($this->storage, ...$args));
    }
258939
def diff_args(subparsers):
    """"""
    diff_parser = subparsers.add_parser('diff')
    secretfile_args(diff_parser)
    vars_args(diff_parser)
    base_args(diff_parser)
    thaw_from_args(diff_parser)
816824
public static function min(array $args)
    {
        usort(
            $args,
            function ($a, $b) {
                return count($a) < count($b) ? 1 : -1;
            }
        );
        return count(end($args));
    }
1170700
public static function getOneWhere($args = array())
    {
        $args['number'] = 1;
        $result = static::getWhere($args);
        return (count($result)) ? current($result) : null;
    }
1146402
function diff( $old, $new, $options = false )
    {
        $diff = new eZDiff();
        $diff->setDiffEngineType( $diff->engineType( 'container' ) );
        $diff->initDiffEngine();
        $diffObject = $diff->diff( $old, $new );
        return $diffObject;
    }
1268947
static function diff($traversable, $traversable2) 
    {
        return static::filter($traversable, function($value) use ($traversable2) {
            return ! Collection::contains($traversable2, $value);
        });
    }
455894
protected function duplicate($args) {
		$targets = is_array($args['targets']) ? $args['targets'] : array();
		$result  = array('added' => array());
		$suffix  = empty($args['suffix']) ? 'copy' : $args['suffix'];
		
		foreach ($targets as $target) {
			if (($volume = $this->volume($target)) == false
			|| ($src = $volume->file($target)) == false) {
				$result['warning'] = $this->error(self::ERROR_COPY, '#'.$target, self::ERROR_FILE_NOT_FOUND);
				break;
			}
			
			if (($file = $volume->duplicate($target, $suffix)) == false) {
				$result['warning'] = $this->error($volume->error());
				break;
			}
			
			$result['added'][] = $file;
		}
		
		return $result;
	}
149766
function diff( $old, $new )
    {
        $datatype = $this->dataType();
        $result = $datatype->diff( $old, $new );
        return $result;
    }
388797
public function data($args)
    {
        foreach (func_get_args() as $arg) {
            if (is_array($arg)) {
                $this->data = array_merge_recursive($arg, $this->data);
            } else {
                $this->data[] = $arg;
            }
        }

        return $this;
    }
1092924
public static function diff($before, $after): array
    {
        if (! Assert::array($before) || ! Assert::array($after)) {
            throw new InvalidArgumentException(
                '`Arr::diff` two parameters must be `array` or implements interface `ArrayAccess`'
            );
        }

        $diff = [];

        foreach ($after as $key => $value) {
            if (! isset($before[$key])) {
                $diff[$key] = $value;
            } elseif ($value != $before[$key]) {
                $diff[$key] = $value;
            }
        }

        return $diff;
    }
1275725
public function func($method, ...$args)
    {
        $this->method = $method;
        $this->args   = $args;
        return $this;
    }
379800
public function bootstrapGridFunction(array $args = []) {

        $output = [];

        $output[] = $this->bootstrapGridStackedFunction($args);
        $output[] = $this->bootstrapGridOffsetFunction($args);
        $output[] = $this->bootstrapGridPushFunction($args);
        $output[] = $this->bootstrapGridPullFunction($args);

        return trim(implode(" ", $output));
    }
357057
public static function getInstance(...$args)
    {
        if(static::isChildClassSingleton())
        {
            $className = static::class;
            if(!isset(static::$instances[$className]))
            {
                static::$instances[$className] = new static(...$args);
            }
            return static::$instances[$className];
        }
        else
        {
            if(null === static::$instance)
            {
                static::$instance = new static(...$args);
            }
            return static::$instance;
        }
    }
969931
public static function evaluateArgs(array $args)
    {

        $parsedArgs = [];

        foreach ($args as $key=>$value) {

            if ($value instanceof self) {
                $parsedArgs[$key] = static::callFast($value);
                continue;
            }
            $parsedArgs[$key] = $args[$key];
        }

        return $parsedArgs;

    }
355759
public static function instance($args = null)
    {
        $class = self::className();
        $instanceKey = self::instanceKey($args);

        if ( ! isset(self::$_instances[$instanceKey]))
        {
            self::$_instances[$instanceKey] = is_array($args) ? new $class($args) : new $class;
        }
        return self::$_instances[$instanceKey];
    }
56996
public function printGitDiff(): int
    {
        // Lazy way; requires git. Will replace with custom implementaiton later.
        
        $argA = \escapeshellarg($this->phars[0]->tmp);
        $argB = \escapeshellarg($this->phars[1]->tmp);
        /** @var string $diff */
        $diff = `git diff --no-index $argA $argB`;
        echo $diff;
        if (empty($diff) && $this->verbose) {
            echo 'No differences encountered.', PHP_EOL;
            return 0;
        }
        return 1;
    }
    
    /**
     * Prints a GNU diff of the two phars.
     *
     * @psalm-suppress ForbiddenCode
     * @return int
     */
    public function printGnuDiff(): int
    {
        // Lazy way. Will replace with custom implementaiton later.
        $argA = \escapeshellarg($this->phars[0]->tmp);
        $argB = \escapeshellarg($this->phars[1]->tmp);
        /** @var string $diff */
        $diff = `diff $argA $argB`;
        echo $diff;
        if (empty($diff) && $this->verbose) {
            echo 'No differences encountered.', PHP_EOL;
            return 0;
        }
        return 1;
    }
1235304
public function getApplicableDiff( array $base, Diff $diff ): Diff {
		$throwErrors = $this->throwErrors;
		$this->throwErrors = false;

		$patched = $this->patch( $base, $diff );

		$this->throwErrors = $throwErrors;

		$treatAsMap = $diff->looksAssociative();

		$differ = $treatAsMap ? new MapDiffer( true ) : new ListDiffer();

		$diffOps = $differ->doDiff( $base, $patched );

		$diff = new Diff( $diffOps, $treatAsMap );

		return $diff;
	}