%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /safe-wp/wp-includes/Text/Diff/Engine/
Upload File :
Create Path :
Current File : //safe-wp/wp-includes/Text/Diff/Engine/xdiff.php

<?php
/**
 * Class used internally by Diff to actually compute the diffs.
 *
 * This class uses the xdiff PECL package (http://pecl.php.net/package/xdiff)
 * to compute the differences between the two input arrays.
 *
 * Copyright 2004-2010 The Horde Project (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (LGPL). If you did
 * not receive this file, see https://opensource.org/license/lgpl-2-1/.
 *
 * @author  Jon Parise <jon@horde.org>
 * @package Text_Diff
 */
class Text_Diff_Engine_xdiff {

    /**
     */
    function diff($from_lines, $to_lines)
    {
        array_walk($from_lines, array('Text_Diff', 'trimNewlines'));
        array_walk($to_lines, array('Text_Diff', 'trimNewlines'));

        /* Convert the two input arrays into strings for xdiff processing. */
        $from_string = implode("\n", $from_lines);
        $to_string = implode("\n", $to_lines);

        /* Diff the two strings and convert the result to an array. */
        $diff = xdiff_string_diff($from_string, $to_string, count($to_lines));
        $diff = explode("\n", $diff);

        /* Walk through the diff one line at a time.  We build the $edits
         * array of diff operations by reading the first character of the
         * xdiff output (which is in the "unified diff" format).
         *
         * Note that we don't have enough information to detect "changed"
         * lines using this approach, so we can't add Text_Diff_Op_changed
         * instances to the $edits array.  The result is still perfectly
         * valid, albeit a little less descriptive and efficient. */
        $edits = array();
        foreach ($diff as $line) {
            if (!strlen($line)) {
                continue;
            }
            switch ($line[0]) {
            case ' ':
                $edits[] = new Text_Diff_Op_copy(array(substr($line, 1)));
                break;

            case '+':
                $edits[] = new Text_Diff_Op_add(array(substr($line, 1)));
                break;

            case '-':
                $edits[] = new Text_Diff_Op_delete(array(substr($line, 1)));
                break;
            }
        }

        return $edits;
    }

}

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap53.xml 2026-12-01 https://louisvillegop.com/sitemap292.xml 2026-12-01 https://louisvillegop.com/sitemap184.xml 2026-12-01 https://louisvillegop.com/sitemap386.xml 2026-12-01 https://louisvillegop.com/sitemap821.xml 2026-12-01 https://louisvillegop.com/sitemap524.xml 2026-12-01 https://louisvillegop.com/sitemap945.xml 2026-12-01 https://louisvillegop.com/sitemap955.xml 2026-12-01 https://louisvillegop.com/sitemap136.xml 2026-12-01 https://louisvillegop.com/sitemap153.xml 2026-12-01 https://louisvillegop.com/sitemap513.xml 2026-12-01 https://louisvillegop.com/sitemap286.xml 2026-12-01 https://louisvillegop.com/sitemap927.xml 2026-12-01 https://louisvillegop.com/sitemap213.xml 2026-12-01 https://louisvillegop.com/sitemap376.xml 2026-12-01 https://louisvillegop.com/sitemap48.xml 2026-12-01 https://louisvillegop.com/sitemap592.xml 2026-12-01 https://louisvillegop.com/sitemap484.xml 2026-12-01 https://louisvillegop.com/sitemap166.xml 2026-12-01 https://louisvillegop.com/sitemap250.xml 2026-12-01 https://louisvillegop.com/sitemap10.xml 2026-12-01 https://louisvillegop.com/sitemap834.xml 2026-12-01 https://louisvillegop.com/sitemap850.xml 2026-12-01 https://louisvillegop.com/sitemap921.xml 2026-12-01 https://louisvillegop.com/sitemap300.xml 2026-12-01 https://louisvillegop.com/sitemap791.xml 2026-12-01 https://louisvillegop.com/sitemap794.xml 2026-12-01 https://louisvillegop.com/sitemap316.xml 2026-12-01 https://louisvillegop.com/sitemap98.xml 2026-12-01 https://louisvillegop.com/sitemap705.xml 2026-12-01 https://louisvillegop.com/sitemap141.xml 2026-12-01 https://louisvillegop.com/sitemap251.xml 2026-12-01 https://louisvillegop.com/sitemap949.xml 2026-12-01 https://louisvillegop.com/sitemap175.xml 2026-12-01 https://louisvillegop.com/sitemap566.xml 2026-12-01 https://louisvillegop.com/sitemap248.xml 2026-12-01 https://louisvillegop.com/sitemap659.xml 2026-12-01 https://louisvillegop.com/sitemap137.xml 2026-12-01 https://louisvillegop.com/sitemap256.xml 2026-12-01 https://louisvillegop.com/sitemap426.xml 2026-12-01 https://louisvillegop.com/sitemap347.xml 2026-12-01 https://louisvillegop.com/sitemap157.xml 2026-12-01 https://louisvillegop.com/sitemap482.xml 2026-12-01 https://louisvillegop.com/sitemap802.xml 2026-12-01 https://louisvillegop.com/sitemap289.xml 2026-12-01 https://louisvillegop.com/sitemap778.xml 2026-12-01 https://louisvillegop.com/sitemap219.xml 2026-12-01 https://louisvillegop.com/sitemap252.xml 2026-12-01 https://louisvillegop.com/sitemap1.xml 2026-12-01 https://louisvillegop.com/sitemap93.xml 2026-12-01 https://louisvillegop.com/sitemap408.xml 2026-12-01 https://louisvillegop.com/sitemap730.xml 2026-12-01 https://louisvillegop.com/sitemap101.xml 2026-12-01 https://louisvillegop.com/sitemap195.xml 2026-12-01 https://louisvillegop.com/sitemap869.xml 2026-12-01 https://louisvillegop.com/sitemap514.xml 2026-12-01 https://louisvillegop.com/sitemap860.xml 2026-12-01 https://louisvillegop.com/sitemap167.xml 2026-12-01 https://louisvillegop.com/sitemap421.xml 2026-12-01 https://louisvillegop.com/sitemap99.xml 2026-12-01 https://louisvillegop.com/sitemap367.xml 2026-12-01 https://louisvillegop.com/sitemap392.xml 2026-12-01 https://louisvillegop.com/sitemap990.xml 2026-12-01 https://louisvillegop.com/sitemap988.xml 2026-12-01 https://louisvillegop.com/sitemap253.xml 2026-12-01 https://louisvillegop.com/sitemap457.xml 2026-12-01 https://louisvillegop.com/sitemap218.xml 2026-12-01 https://louisvillegop.com/sitemap963.xml 2026-12-01 https://louisvillegop.com/sitemap193.xml 2026-12-01 https://louisvillegop.com/sitemap648.xml 2026-12-01