Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/wwwroot/mifepriston.org/vendor/phpspec/php-diff/example/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <title>PHP LibDiff - Examples</title> <link rel="stylesheet" href="styles.css" type="text/css" charset="utf-8"/> </head> <body> <h1>PHP LibDiff - Examples</h1> <hr /> <?php // Include the diff class require_once dirname(__FILE__).'/../lib/Diff.php'; // Include two sample files for comparison $a = explode("\n", file_get_contents(dirname(__FILE__).'/a.txt')); $b = explode("\n", file_get_contents(dirname(__FILE__).'/b.txt')); // Options for generating the diff $options = array( //'ignoreWhitespace' => true, //'ignoreCase' => true, ); // Initialize the diff class $diff = new Diff($a, $b, $options); ?> <h2>Side by Side Diff</h2> <?php // Generate a side by side diff require_once dirname(__FILE__).'/../lib/Diff/Renderer/Html/SideBySide.php'; $renderer = new Diff_Renderer_Html_SideBySide; echo $diff->Render($renderer); ?> <h2>Inline Diff</h2> <?php // Generate an inline diff require_once dirname(__FILE__).'/../lib/Diff/Renderer/Html/Inline.php'; $renderer = new Diff_Renderer_Html_Inline; echo $diff->render($renderer); ?> <h2>Unified Diff</h2> <pre><?php // Generate a unified diff require_once dirname(__FILE__).'/../lib/Diff/Renderer/Text/Unified.php'; $renderer = new Diff_Renderer_Text_Unified; echo htmlspecialchars($diff->render($renderer)); ?> </pre> <h2>Context Diff</h2> <pre><?php // Generate a context diff require_once dirname(__FILE__).'/../lib/Diff/Renderer/Text/Context.php'; $renderer = new Diff_Renderer_Text_Context; echo htmlspecialchars($diff->render($renderer)); ?> </pre> </body> </html>